[patch] Update definition of gpkg_data_column_constraints table

16 views
Skip to first unread message

Brad Hards

unread,
Sep 25, 2015, 5:40:14 AM9/25/15
to SpatiaLite Users
Hi Sandro,

The GeoPackage Standards Working Group has made a breaking change
to the definition of gpkg_data_column_constraints,
https://github.com/opengeospatial/geopackage/commit/3cf912794b2912639a082fc42c901507ba2447d8
which you can see the result of here:
http://www.geopackage.org/spec/#_gpkg_data_column_constraints

We need to reflect that. There is also a "TODO" that was long resolved.

Brad

--- src/geopackage/gpkgCreateBaseTables.c
+++ src/geopackage/gpkgCreateBaseTables.c
@@ -117,11 +117,10 @@
"max_y DOUBLE NOT NULL,\n"
"CONSTRAINT fk_gtms_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name),\n"
"CONSTRAINT fk_gtms_srs FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys (srs_id))",

/* Geopackage specification Table 9 / Table 27 */
- /* TODO: figure out if the defaults are required - https://github.com/opengis/geopackage/issues/67 */
"CREATE TABLE gpkg_tile_matrix (\n"
"table_name TEXT NOT NULL,\n"
"zoom_level INTEGER NOT NULL,\n"
"matrix_width INTEGER NOT NULL,\n"
"matrix_height INTEGER NOT NULL,\n"
@@ -148,13 +147,13 @@
"CREATE TABLE gpkg_data_column_constraints (\n"
"constraint_name TEXT NOT NULL,\n"
"constraint_type TEXT NOT NULL,\n"
"value TEXT,\n"
"min NUMERIC,\n"
- "minIsInclusive BOOLEAN,\n"
+ "min_is_inclusive BOOLEAN,\n"
"max NUMERIC,\n"
- "maxIsInclusive BOOLEAN,\n"
+ "max_is_inclusive BOOLEAN,\n"
"description TEXT,\n"
"CONSTRAINT gdcc_ntv UNIQUE (constraint_name, constraint_type, value))",

/* GeoPackage specification Table 14 / Table 33 */
"CREATE TABLE gpkg_metadata (\n"

a.fu...@lqt.it

unread,
Sep 26, 2015, 8:17:58 AM9/26/15
to spatiali...@googlegroups.com
Hi Brad,

your proposed patch has beem accepted and is now committed
into the Fossil repository.

bye Sandro

Reply all
Reply to author
Forward
0 new messages