From 128c12d67841895131e30caf2cf550f63df09ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aure=CC=80le=20Nitoref?= Date: Fri, 4 Oct 2024 00:40:10 +0200 Subject: [PATCH] Fix spatialite schema describer tests --- .../describers/sqlite_describer_tests.rs | 306 +----------------- 1 file changed, 1 insertion(+), 305 deletions(-) diff --git a/schema-engine/sql-schema-describer/tests/describers/sqlite_describer_tests.rs b/schema-engine/sql-schema-describer/tests/describers/sqlite_describer_tests.rs index 05619cc3b71..e1469946d4d 100644 --- a/schema-engine/sql-schema-describer/tests/describers/sqlite_describer_tests.rs +++ b/schema-engine/sql-schema-describer/tests/describers/sqlite_describer_tests.rs @@ -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#" @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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: [],