SPOPS still relies on the database to do the auto-incrementing for you, it just provides a consistent interface on how to retrieve the incremented value.

IME, database-generated index fields break down cleanly into two types: those that expect you to trigger something before the INSERT so you can get the incremented value, and those that create a unique value and make it available after the INSERT. Oracle, PostgreSQL, mSQL and other databases that use sequences fall in the first category -- even if you embed the sequence select in the INSERT. In the second category we have Transact-SQL databases (Sybase ASA/ASE, Microsoft SQL) and MySQL.

So all SPOPS does is ask you to tell it if you're using an auto-increment field and tell it what type of database you're using. It's generally smart enough to figure out the rest.

And that was probably me bringing up SPOPS those times you saw it. One of my resolutions is to become an annoying tubthumper for my work and get other people interested enough to contribute :-)

Chris
M-x auto-bs-mode


In reply to SPOPS and auto-incrementing by lachoy
in thread MySQL, DBIx::Recordset and is there a better way? by jonjacobmoon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.