Skip to content

Commit

Permalink
Fix spatialite schema describer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreilles committed Oct 3, 2024
1 parent c7a5ed3 commit 128c12d
Showing 1 changed file with 1 addition and 305 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,36 +221,20 @@ fn spatialite_column_types_must_work(api: TestApi) {
SELECT
AddGeometryColumn('User', 'geometry_xy', 4326, 'GEOMETRY', 'XY', 0),
AddGeometryColumn('User', 'geometry_xyz', 4326, 'GEOMETRY', 'XYZ', 0),
AddGeometryColumn('User', 'geometry_xym', 4326, 'GEOMETRY', 'XYM', 0),
AddGeometryColumn('User', 'geometry_xyzm', 4326, 'GEOMETRY', 'XYZM', 0),
AddGeometryColumn('User', 'point_xy', 4326, 'POINT', 'XY', 0),
AddGeometryColumn('User', 'point_xyz', 4326, 'POINT', 'XYZ', 0),
AddGeometryColumn('User', 'point_xym', 4326, 'POINT', 'XYM', 0),
AddGeometryColumn('User', 'point_xyzm', 4326, 'POINT', 'XYZM', 0),
AddGeometryColumn('User', 'linestring_xy', 4326, 'LINESTRING', 'XY', 0),
AddGeometryColumn('User', 'linestring_xyz', 4326, 'LINESTRING', 'XYZ', 0),
AddGeometryColumn('User', 'linestring_xym', 4326, 'LINESTRING', 'XYM', 0),
AddGeometryColumn('User', 'linestring_xyzm', 4326, 'LINESTRING', 'XYZM', 0),
AddGeometryColumn('User', 'polygon_xy', 4326, 'POLYGON', 'XY', 0),
AddGeometryColumn('User', 'polygon_xyz', 4326, 'POLYGON', 'XYZ', 0),
AddGeometryColumn('User', 'polygon_xym', 4326, 'POLYGON', 'XYM', 0),
AddGeometryColumn('User', 'polygon_xyzm', 4326, 'POLYGON', 'XYZM', 0),
AddGeometryColumn('User', 'multipoint_xy', 4326, 'MULTIPOINT', 'XY', 0),
AddGeometryColumn('User', 'multipoint_xyz', 4326, 'MULTIPOINT', 'XYZ', 0),
AddGeometryColumn('User', 'multipoint_xym', 4326, 'MULTIPOINT', 'XYM', 0),
AddGeometryColumn('User', 'multipoint_xyzm', 4326, 'MULTIPOINT', 'XYZM', 0),
AddGeometryColumn('User', 'multilinestring_xy', 4326, 'MULTILINESTRING', 'XY', 0),
AddGeometryColumn('User', 'multilinestring_xyz', 4326, 'MULTILINESTRING', 'XYZ', 0),
AddGeometryColumn('User', 'multilinestring_xym', 4326, 'MULTILINESTRING', 'XYM', 0),
AddGeometryColumn('User', 'multilinestring_xyzm', 4326, 'MULTILINESTRING', 'XYZM', 0),
AddGeometryColumn('User', 'multipolygon_xy', 4326, 'MULTIPOLYGON', 'XY', 0),
AddGeometryColumn('User', 'multipolygon_xyz', 4326, 'MULTIPOLYGON', 'XYZ', 0),
AddGeometryColumn('User', 'multipolygon_xym', 4326, 'MULTIPOLYGON', 'XYM', 0),
AddGeometryColumn('User', 'multipolygon_xyzm', 4326, 'MULTIPOLYGON', 'XYZM', 0),
AddGeometryColumn('User', 'geometrycollection_xy', 4326, 'GEOMETRYCOLLECTION', 'XY', 0),
AddGeometryColumn('User', 'geometrycollection_xyz', 4326, 'GEOMETRYCOLLECTION', 'XYZ', 0),
AddGeometryColumn('User', 'geometrycollection_xym', 4326, 'GEOMETRYCOLLECTION', 'XYM', 0),
AddGeometryColumn('User', 'geometrycollection_xyzm', 4326, 'GEOMETRYCOLLECTION', 'XYZM', 0);
AddGeometryColumn('User', 'geometrycollection_xyz', 4326, 'GEOMETRYCOLLECTION', 'XYZ', 0);
"#;
api.raw_cmd(sql);
let expectation = expect![[r#"
Expand Down Expand Up @@ -323,42 +307,6 @@ fn spatialite_column_types_must_work(api: TestApi) {
description: None,
},
),
(
TableId(
0,
),
Column {
name: "geometry_xym",
tpe: ColumnType {
full_data_type: "GEOMETRY",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
),
Column {
name: "geometry_xyzm",
tpe: ColumnType {
full_data_type: "GEOMETRY",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
Expand Down Expand Up @@ -395,42 +343,6 @@ fn spatialite_column_types_must_work(api: TestApi) {
description: None,
},
),
(
TableId(
0,
),
Column {
name: "point_xym",
tpe: ColumnType {
full_data_type: "POINT",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
),
Column {
name: "point_xyzm",
tpe: ColumnType {
full_data_type: "POINT",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
Expand Down Expand Up @@ -467,42 +379,6 @@ fn spatialite_column_types_must_work(api: TestApi) {
description: None,
},
),
(
TableId(
0,
),
Column {
name: "linestring_xym",
tpe: ColumnType {
full_data_type: "LINESTRING",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
),
Column {
name: "linestring_xyzm",
tpe: ColumnType {
full_data_type: "LINESTRING",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
Expand Down Expand Up @@ -539,42 +415,6 @@ fn spatialite_column_types_must_work(api: TestApi) {
description: None,
},
),
(
TableId(
0,
),
Column {
name: "polygon_xym",
tpe: ColumnType {
full_data_type: "POLYGON",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
),
Column {
name: "polygon_xyzm",
tpe: ColumnType {
full_data_type: "POLYGON",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
Expand Down Expand Up @@ -611,42 +451,6 @@ fn spatialite_column_types_must_work(api: TestApi) {
description: None,
},
),
(
TableId(
0,
),
Column {
name: "multipoint_xym",
tpe: ColumnType {
full_data_type: "MULTIPOINT",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
),
Column {
name: "multipoint_xyzm",
tpe: ColumnType {
full_data_type: "MULTIPOINT",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
Expand Down Expand Up @@ -683,42 +487,6 @@ fn spatialite_column_types_must_work(api: TestApi) {
description: None,
},
),
(
TableId(
0,
),
Column {
name: "multilinestring_xym",
tpe: ColumnType {
full_data_type: "MULTILINESTRING",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
),
Column {
name: "multilinestring_xyzm",
tpe: ColumnType {
full_data_type: "MULTILINESTRING",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
Expand Down Expand Up @@ -755,42 +523,6 @@ fn spatialite_column_types_must_work(api: TestApi) {
description: None,
},
),
(
TableId(
0,
),
Column {
name: "multipolygon_xym",
tpe: ColumnType {
full_data_type: "MULTIPOLYGON",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
),
Column {
name: "multipolygon_xyzm",
tpe: ColumnType {
full_data_type: "MULTIPOLYGON",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
Expand Down Expand Up @@ -827,42 +559,6 @@ fn spatialite_column_types_must_work(api: TestApi) {
description: None,
},
),
(
TableId(
0,
),
Column {
name: "geometrycollection_xym",
tpe: ColumnType {
full_data_type: "GEOMETRYCOLLECTION",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
(
TableId(
0,
),
Column {
name: "geometrycollection_xyzm",
tpe: ColumnType {
full_data_type: "GEOMETRYCOLLECTION",
family: Geometry,
arity: Nullable,
native_type: Some(
NativeTypeInstance(..),
),
},
auto_increment: false,
description: None,
},
),
],
foreign_keys: [],
table_default_values: [],
Expand Down

0 comments on commit 128c12d

Please sign in to comment.