RE: Firebird generators

From: Cris Daniluk (cris.danilu..laraview.com)
Date: Wed Mar 23 2005 - 17:27:12 EST

  • Next message: Cris Daniluk: "Copying DataObjects"

     
    > I have a proposal for addition of sequences for Firebird,
    > which i need in a project of mine.
    >
    > Firebird has plans for supporting SQL sequences in the future
    > (not so near), but for now it has proprietary syntax
    > available with similar (probably same?) semantics. Firebird
    > calls sequences generators and they are accessed in the
    > following manner:
    >

    All databases use a propietary syntax for sequences/generators. There's no
    real standard :)

    > Would implementing these be as simple as replacing
    > appropriate portions of PostgresPkGenerator and moving it
    > into FirebirdPkGenerator ?
    >

    I don't see why not. Firebird's syntax is not substantially enough different
    to cause any problems.

    > What is the behaviour of cayenne if i already have created
    > generators (in the database) from other portions of system,
    > how do i supply new initial value for non existing generators
    > (ones which cayenne will create)?
    >
    The value is a one-time shot defined in createSequenceString(). You could
    probably make something more elaborate if you needed, but I doubt it would
    be too useful (or desirable) to anyone else.

    If you properly implement getExistingSequences, you should have no problems
    clashing with existing ones.

    Cris



    This archive was generated by hypermail 2.0.0 : Wed Mar 23 2005 - 17:27:09 EST