Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating Ada: Autoincrement Fields for sqlite #55

Open
fdesp87 opened this issue Oct 26, 2022 · 0 comments
Open

Generating Ada: Autoincrement Fields for sqlite #55

fdesp87 opened this issue Oct 26, 2022 · 0 comments

Comments

@fdesp87
Copy link

fdesp87 commented Oct 26, 2022

Autoincrement fields in sqlite are implemented as 64-bit signed integer (see https://www.sqlite.org/autoinc.html) and automatically are primary keys (different from Postgresql where autoincrement fields are not automatically primary key).

They are mapped in the schema to Integer Autoincrement Primary Key (see gnatcoll-sql-sqlite-builder.adb around line 1155), which is correct.

However they are mapped later to Ada Integer instead of Ada Long_Long_Integer. Also in gantcoll-sql-inspec.ads, this has to be changed having its Field_Mapping changed to SQL_Field_Bigint.

For more explanations, you can read the report
https://github.com/fdesp87/gnatcoll-db/examples/mytests/Report.odt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant