7 Commits

Author SHA1 Message Date
anisimko
767216d0e0 Fix sqlite2db issues
* sql/gnatcoll-sql-inspect.adb (Type_From_SQL):
For Field_Mapping_Integer does not interpret 'numeric' without precision and
scale as Integer. Add decimal type processing.
For Field_Mapping_Float interpret 'decimal' and 'numeric' without precision
and scale as Float.

* sqlite/gnatcoll-sql-sqlite-builder.adb (Foreach_Field):
Ignore square brackets in field names. Fix parsing numeric with position and
scale.

* testsuite/tests/db2ada/chinook/*
Testsuite with public database example.

TN: T627-001
Change-Id: I38843e0c1b6be144d19b9f2e7ed118c2bf44e070
2020-06-30 08:02:57 +06:00
anisimko
37cda9383c Fixes in database schema processing
* gnatcoll-sql-inspect.ads (Type_From_SQL):
Considers datetime as Field_Mapping_Timestamp.

* gnatcoll-sql-inspect.adb (Type_From_SQL):
Considers nvarchar as Field_Mapping_Text.
Parsing max length moved into separated routine Process Max_Length.

* sqlite/gnatcoll-sql-sqlite-builder.adb
(Foreach_Table): Fix SQL request over database tables. Takes only
tables and views from the sqlite_master and does not take service
SQLite tables.
(Foreach_Field): Do not interpret as field the FOREIGN/UNIQUE KEY
element in CREATE TABLE statement.

TN: T627-001
Change-Id: Ibb6ca6c6a67489bbe569c0c0b1aed2e5a9cd4b34
2020-06-27 15:54:18 +02:00
Vasiliy Fofanov
c067251840 Fix various typos and headers, bump copyright.
Motivated by github PR #14. no-tn-check

Change-Id: I866431c55fe0937f348d08cd8a188eb40fc8f061
2020-06-12 19:29:25 +02:00
Dmitriy Anisimkov
b66441cce0 Create body for some expression functions
R411-015

Because GNAT became checking unreferenced parameter for expression functions
but did not provide a way to mark it unchecked in this state.

Change-Id: I8b5b65bb2701a989dd000aeb56290322c982a61e
2018-04-12 10:19:57 +02:00
Dmitriy Anisimkov
1a3c092061 SQLite callback helping to find locking problem
R110-010

Change-Id: I1034afb9624eb25bd48f42dae8ee7637f255af21
2018-02-07 08:59:01 +01:00
Dmitriy Anisimkov
115acab753 Remove obsolete routines
Change-Id: Ic8d7e48d1057a735bb64fabed0c5c5f0945b9f83
2017-11-23 14:10:53 +01:00
Vasiliy Fofanov
ce99ac280e Initial version of gnatcoll-db module.
Part of major reorganization of gnatcoll for better modularity and
maintainability.

Change-Id: Iad961b53634520081eb90c37aff2bfdbf58b2e06
TN: P909-033 no-precommit-check
2017-10-29 15:30:27 +01:00