Coder Social home page Coder Social logo

Comments (5)

eskatos avatar eskatos commented on August 12, 2024

The SQL snippet shown above would be the standard one.

Here are the PostgreSQL and MySQL ones :

// Standard SQL:
"my_pk_column BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY"

// PostgreSQL:
"my_pk_column BIGSERIAL PRIMARY KEY"

// MySQL
"my_pk_column BIGINT AUTO_INCREMENT PRIMARY KEY"

from java-sql-generator.

stazz avatar stazz commented on August 12, 2024

Hi Paul,
Yes, there is no way to do so in current version. I will start working on implementing this right now and will post here when it's done or something weird happens. :)

from java-sql-generator.

stazz avatar stazz commented on August 12, 2024

I've pushed the changes made for this issue. Unfortunately, I am yet unable to upload the new snapshot to Maven repository. Report any problems here if you have them, I will test more and upload snapshot to Maven repository later this week, hopefully.

Edit: Check out DefinitionFactory for new method which accepts auto generation policy for ColumnDefinition. The primary key specification is still done via different way - by applying UniqueConstraint to TableDefinition.

from java-sql-generator.

eskatos avatar eskatos commented on August 12, 2024

Stan,

Tested and approved!

We need a release now :-)

from java-sql-generator.

stazz avatar stazz commented on August 12, 2024

Released version 0.3. with auto-generated column support.

from java-sql-generator.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.