Revision 47580
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/main/java/org/gvsig/sqlite/dal/SQLiteSQLBuilder.java | ||
---|---|---|
12 | 12 |
import java.util.Date; |
13 | 13 |
import java.util.List; |
14 | 14 |
import org.apache.commons.lang3.StringUtils; |
15 |
import org.gvsig.expressionevaluator.ExpressionBuilder; |
|
15 | 16 |
import org.gvsig.expressionevaluator.ExpressionBuilder.Parameter; |
16 | 17 |
import org.gvsig.expressionevaluator.Formatter; |
17 | 18 |
import org.gvsig.fmap.dal.DataTypes; |
... | ... | |
55 | 56 |
this.STMT_DELETE_GEOMETRY_COLUMN_FROM_TABLE_schema_table = null; //"DELETE FROM gpkg_geometry_columns WHERE table_name = {1}"; |
56 | 57 |
this.STMT_DELETE_GEOMETRY_COLUMN_FROM_TABLE_table = "DELETE FROM gpkg_geometry_columns WHERE table_name = {0}"; |
57 | 58 |
|
58 |
this.STMT_UPDATE_TABLE_STATISTICS_table = "SELECT UpdateLayerStatistics({0})";
|
|
59 |
this.STMT_UPDATE_TABLE_STATISTICS_table = "ANALYZE {0}";
|
|
59 | 60 |
|
60 | 61 |
this.type_boolean = "BOOLEAN"; |
61 | 62 |
this.type_byte = "TINYINT"; |
... | ... | |
136 | 137 |
sqls.add(TemplateUtils.getSqlTemplate(GeopackageIndexRTree.GROUP_NAME, "create_table_gpkg_extensions")); |
137 | 138 |
sqls.add(GeopackageGeometryColumns.buildCreateTableSQLIfNotExists()); |
138 | 139 |
sqls.add(String.format( |
139 |
"INSERT INTO \"main\".\"gpkg_contents\" (\"table_name\", \"data_type\", \"identifier\", \"description\", \"last_change\", \"min_x\", \"min_y\", \"max_x\", \"max_y\", \"srs_id\") VALUES ('%s', '%s', '%s', '', '%s', NULL, NULL, NULL, NULL, NULL)",
|
|
140 |
"INSERT INTO \"gpkg_contents\" (\"table_name\", \"data_type\", \"identifier\", \"description\", \"last_change\", \"min_x\", \"min_y\", \"max_x\", \"max_y\", \"srs_id\") VALUES ('%s', '%s', '%s', '', '%s', NULL, NULL, NULL, NULL, NULL)", |
|
140 | 141 |
this.table.getName(), |
141 | 142 |
"features", |
142 | 143 |
this.table.getName(), |
... | ... | |
144 | 145 |
)); |
145 | 146 |
} else { |
146 | 147 |
sqls.add(String.format( |
147 |
"INSERT INTO \"main\".\"gpkg_contents\" (\"table_name\", \"data_type\", \"identifier\", \"description\", \"last_change\", \"min_x\", \"min_y\", \"max_x\", \"max_y\", \"srs_id\") VALUES ('%s', '%s', '%s', '', '%s', NULL, NULL, NULL, NULL, NULL)",
|
|
148 |
"INSERT INTO \"gpkg_contents\" (\"table_name\", \"data_type\", \"identifier\", \"description\", \"last_change\", \"min_x\", \"min_y\", \"max_x\", \"max_y\", \"srs_id\") VALUES ('%s', '%s', '%s', '', '%s', NULL, NULL, NULL, NULL, NULL)", |
|
148 | 149 |
this.table.getName(), |
149 | 150 |
"attributes", |
150 | 151 |
this.table.getName(), |
... | ... | |
217 | 218 |
column.getGeometrySRSId() |
218 | 219 |
)); |
219 | 220 |
|
220 |
//TODO: A?adir el insert a gpkg_extensions |
|
221 | 221 |
GeopackageIndexRTree index = new GeopackageIndexRTree(); |
222 | 222 |
sqls.addAll(index.getCreateIndexSQL(this.table.getName(), column.getName(), pkName)); |
223 | 223 |
|
... | ... | |
245 | 245 |
@Override |
246 | 246 |
public List<String> toStrings(Formatter formatter) { |
247 | 247 |
List<String> sqls = new ArrayList<>(); |
248 |
|
|
249 |
String sql; |
|
250 |
sql = MessageFormat.format( |
|
251 |
STMT_DELETE_GEOMETRY_COLUMN_FROM_TABLE_table, |
|
252 |
as_identifier(this.table.getName()) |
|
253 |
); |
|
254 |
if (!StringUtils.isEmpty(sql)) { |
|
255 |
sqls.add(sql); |
|
256 |
} |
|
257 | 248 |
|
249 |
//No se pueden borrar aqui los indices espaciales, se hace en el explorer.remove |
|
250 |
// GeopackageIndexRTree index = new GeopackageIndexRTree(); |
|
251 |
// sqls.addAll(index.getRemoveIndexSQL(this.table.getName(), column.getName(), pkName)); |
|
252 |
|
|
253 |
sqls.add(GeopackageGeometryColumns.buildDeleteSQL(this.table.getName())); |
|
254 |
|
|
258 | 255 |
sqls.add(String.format( |
259 |
"DELETE FROM \"main\".\"gpkg_contents\" WHERE \"identifier\" = '%s'",
|
|
256 |
"DELETE FROM \"gpkg_contents\" WHERE \"identifier\" = '%s'", |
|
260 | 257 |
this.table.getName() |
261 | 258 |
)); |
262 | 259 |
|
263 | 260 |
sqls.add(String.format( |
264 |
"DELETE FROM \"main\".\"gpkg_extensions\" WHERE \"table_name\" = '%s'",
|
|
261 |
"DELETE FROM \"gpkg_extensions\" WHERE \"table_name\" = '%s'", |
|
265 | 262 |
this.table.getName() |
266 | 263 |
)); |
267 |
|
|
264 |
|
|
268 | 265 |
sqls.add( |
269 | 266 |
MessageFormat.format( |
270 | 267 |
STMT_DROP_TABLE_table, |
... | ... | |
481 | 478 |
} |
482 | 479 |
|
483 | 480 |
|
484 |
|
|
485 | 481 |
@Override |
486 | 482 |
public TableNameBuilder createTableNameBuilder() { |
487 | 483 |
return new SQLiteTableNameBuilderBase(); |
... | ... | |
508 | 504 |
this.formatter = new SQLiteFormatter(this); |
509 | 505 |
} |
510 | 506 |
return this.formatter; |
511 |
} |
|
507 |
}
|
|
512 | 508 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/main/java/org/gvsig/sqlite/dal/operations/SQLiteFetchFeatureTypeOperation.java | ||
---|---|---|
4 | 4 |
import java.sql.ResultSet; |
5 | 5 |
import java.sql.ResultSetMetaData; |
6 | 6 |
import java.sql.SQLException; |
7 |
import java.util.Collection; |
|
8 |
import java.util.Collections; |
|
7 | 9 |
import java.util.HashMap; |
8 | 10 |
import java.util.List; |
9 | 11 |
import java.util.Map; |
... | ... | |
219 | 221 |
LOGGER.warn("Can't read metadata from table '"+table+"'.",ex); |
220 | 222 |
} |
221 | 223 |
} |
224 |
|
|
225 |
@Override |
|
226 |
protected List<String> getPrimaryKeysFromInformationSchema(JDBCConnection conn) throws SQLException { |
|
227 |
return Collections.EMPTY_LIST; |
|
228 |
} |
|
229 |
|
|
230 |
@Override |
|
231 |
public String getSQLToRetrievePrimaryKeysFromInformationSchema() throws SQLException { |
|
232 |
return null; |
|
233 |
} |
|
234 |
|
|
235 |
|
|
236 |
|
|
237 |
|
|
222 | 238 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/main/java/org/gvsig/sqlite/dal/geopackage/GeopackageGeometryColumns.java | ||
---|---|---|
177 | 177 |
break; |
178 | 178 |
} |
179 | 179 |
String s = String.format( |
180 |
"INSERT INTO \"main\".\"gpkg_geometry_columns\" (\"table_name\", \"column_name\", \"geometry_type_name\", \"srs_id\", \"z\", \"m\") VALUES ('%s', '%s', '%s', '%s', '%s', '%s')",
|
|
180 |
"INSERT INTO \"gpkg_geometry_columns\" (\"table_name\", \"column_name\", \"geometry_type_name\", \"srs_id\", \"z\", \"m\") VALUES ('%s', '%s', '%s', '%s', '%s', '%s')", |
|
181 | 181 |
tableName, |
182 | 182 |
geomName, |
183 | 183 |
geometryTypeName, |
... | ... | |
188 | 188 |
|
189 | 189 |
return s; |
190 | 190 |
} |
191 |
|
|
191 | 192 |
public static String buildDeleteSQL(String tableName, String geomName) { |
192 | 193 |
String s = String.format( |
193 |
"DELETE FROM \"main\".\"gpkg_geometry_columns\" WHERE \"table_name\" = '%s' and \"column_name\" = '%s'",
|
|
194 |
"DELETE FROM \"gpkg_geometry_columns\" WHERE \"table_name\" = '%s' and \"column_name\" = '%s'", |
|
194 | 195 |
tableName, |
195 | 196 |
geomName |
196 | 197 |
); |
197 | 198 |
|
198 | 199 |
return s; |
199 | 200 |
} |
201 |
|
|
202 |
public static String buildDeleteSQL(String tableName) { |
|
203 |
String s = String.format( |
|
204 |
"DELETE FROM \"gpkg_geometry_columns\" WHERE \"table_name\" = '%s'", |
|
205 |
tableName |
|
206 |
); |
|
207 |
|
|
208 |
return s; |
|
209 |
} |
|
200 | 210 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/main/java/org/gvsig/sqlite/dal/expressionbuilderformatter/Exists.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2020 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 3 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.sqlite.dal.expressionbuilderformatter; |
|
25 |
|
|
26 |
import org.apache.commons.lang3.StringUtils; |
|
27 |
import org.gvsig.expressionevaluator.ExpressionBuilder; |
|
28 |
import org.gvsig.expressionevaluator.ExpressionBuilder.Function; |
|
29 |
import org.gvsig.expressionevaluator.ExpressionBuilder.Value; |
|
30 |
import org.gvsig.expressionevaluator.Formatter; |
|
31 |
import static org.gvsig.fmap.dal.DataManager.FUNCTION_EXISTS; |
|
32 |
|
|
33 |
/** |
|
34 |
* |
|
35 |
* @author jjdelcerro |
|
36 |
*/ |
|
37 |
public class Exists implements Formatter<Value> { |
|
38 |
|
|
39 |
private final Formatter<Value> formatter; |
|
40 |
|
|
41 |
public Exists(Formatter<Value> formatter) { |
|
42 |
this.formatter = formatter; |
|
43 |
} |
|
44 |
@Override |
|
45 |
public boolean canApply(ExpressionBuilder.Value value) { |
|
46 |
if (value instanceof ExpressionBuilder.Function) { |
|
47 |
return StringUtils.equalsIgnoreCase(FUNCTION_EXISTS, ((Function) value).name()); |
|
48 |
} |
|
49 |
return false; |
|
50 |
} |
|
51 |
|
|
52 |
@Override |
|
53 |
public String format(Value function0) { |
|
54 |
Function function = (Function) function0; |
|
55 |
Value exp = function.parameters().get(0); |
|
56 |
return "EXISTS"+exp.toString(formatter); |
|
57 |
} |
|
58 |
|
|
59 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/main/java/org/gvsig/sqlite/dal/expressionbuilderformatter/SQLiteFormatter.java | ||
---|---|---|
10 | 10 |
import org.gvsig.fmap.dal.store.jdbc2.spi.expressionbuilder.formatters.$HostExpression; |
11 | 11 |
import org.gvsig.fmap.dal.store.jdbc2.spi.expressionbuilder.formatters.$Identifier; |
12 | 12 |
import org.gvsig.fmap.dal.store.jdbc2.spi.expressionbuilder.formatters.ComputedAttribute; |
13 |
import org.gvsig.fmap.dal.store.jdbc2.spi.expressionbuilder.formatters.Exists; |
|
14 | 13 |
import org.gvsig.fmap.dal.store.jdbc2.spi.expressionbuilder.formatters.ILike; |
15 | 14 |
import org.gvsig.fmap.dal.store.jdbc2.spi.expressionbuilder.formatters.In; |
16 | 15 |
import org.gvsig.fmap.dal.store.jdbc2.spi.expressionbuilder.formatters.IsNotNull; |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/resources/org/gvsig/sqlite/dal/createTable.sql | ||
---|---|---|
1 |
-- normalize-spaces false |
|
2 |
-- strip-start false |
|
3 |
-- remove-nl false |
|
1 | 4 |
|
2 |
-- Se usa en TestCreateTable. |
|
3 |
-- Se corresponde con el fichero CSV "testCreateSource1.csv". |
|
5 |
-- begin createTable |
|
6 |
CREATE TABLE IF NOT EXISTS gpkg_contents (table_name TEXT NOT NULL PRIMARY KEY,data_type TEXT NOT NULL,identifier TEXT UNIQUE,description TEXT DEFAULT '',last_change DATETIME NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),min_x DOUBLE, min_y DOUBLE,max_x DOUBLE, max_y DOUBLE,srs_id INTEGER,CONSTRAINT fk_gc_r_srs_id FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys(srs_id)) |
|
7 |
-- end createTable |
|
4 | 8 |
|
5 |
--CREATE TABLE "test" ( |
|
6 |
-- "ID" INTEGER PRIMARY KEY NOT NULL, |
|
7 |
-- "Byte" TINYINT DEFAULT NULL, |
|
8 |
-- "Bool1" BOOLEAN DEFAULT NULL, |
|
9 |
-- "Long" BIGINT DEFAULT NULL, |
|
10 |
-- "Timestamp" TIMESTAMP DEFAULT NULL, |
|
11 |
-- "Date" DATE DEFAULT NULL, |
|
12 |
-- "Time" TIME DEFAULT NULL, |
|
13 |
-- "Bool2" BOOLEAN DEFAULT NULL, |
|
14 |
-- "String" VARCHAR(30) DEFAULT NULL, |
|
15 |
-- "Bool3" BOOLEAN DEFAULT NULL, |
|
16 |
-- "Double" DOUBLE DEFAULT NULL, |
|
17 |
-- "Bool4" BOOLEAN DEFAULT NULL, |
|
18 |
-- "Float" REAL DEFAULT NULL, |
|
19 |
-- "Bool5" BOOLEAN DEFAULT NULL, |
|
20 |
-- "Decimal" DECIMAL(6,3) DEFAULT NULL, |
|
21 |
-- H2 Spatial usa la constraint para averiguar el tipo de geometria, |
|
22 |
-- la dimension de esta (2D,3D,...) y el SRID. |
|
23 |
-- "Geometry" GEOMETRY(1) CHECK NVL2("Geometry", ST_GeometryTypeCode("Geometry") = 1 AND ST_CoordDim("Geometry") = 2 AND ST_SRID("Geometry") = 4326, TRUE) |
|
24 |
--); |
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
CREATE TABLE IF NOT EXISTS gpkg_contents (table_name TEXT NOT NULL PRIMARY KEY,data_type TEXT NOT NULL,identifier TEXT UNIQUE,description TEXT DEFAULT '',last_change DATETIME NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),min_x DOUBLE, min_y DOUBLE,max_x DOUBLE, max_y DOUBLE,srs_id INTEGER,CONSTRAINT fk_gc_r_srs_id FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys(srs_id)); |
|
29 |
|
|
9 |
-- begin createTable |
|
30 | 10 |
CREATE TABLE IF NOT EXISTS gpkg_extensions ( |
31 | 11 |
table_name TEXT, |
32 | 12 |
column_name TEXT, |
33 | 13 |
extension_name TEXT NOT NULL, |
34 | 14 |
definition TEXT NOT NULL, |
35 | 15 |
scope TEXT NOT NULL, |
36 |
CONSTRAINT ge_tce UNIQUE (table_name, column_name, extension_name) ); |
|
16 |
CONSTRAINT ge_tce UNIQUE (table_name, column_name, extension_name) ) |
|
17 |
-- end createTable |
|
37 | 18 |
|
19 |
-- begin createTable |
|
38 | 20 |
CREATE TABLE IF NOT EXISTS "gpkg_geometry_columns" ( |
39 | 21 |
"table_name" TEXT NOT NULL, |
40 | 22 |
"column_name" TEXT NOT NULL, |
... | ... | |
46 | 28 |
CONSTRAINT "fk_gc_tn" FOREIGN KEY("table_name") REFERENCES "gpkg_contents"("table_name"), |
47 | 29 |
CONSTRAINT "uk_gc_table_name" UNIQUE("table_name"), |
48 | 30 |
CONSTRAINT "fk_gc_srs" FOREIGN KEY("srs_id") REFERENCES "gpkg_spatial_ref_sys"("srs_id") |
49 |
); |
|
31 |
) |
|
32 |
-- end createTable |
|
50 | 33 |
|
51 |
INSERT INTO "main"."gpkg_contents" ("table_name", "data_type", "identifier", "description", "last_change", "min_x", "min_y", "max_x", "max_y", "srs_id") VALUES ('test', 'features', 'test', '', '2023-10-31 10:41:12.628', NULL, NULL, NULL, NULL, NULL); |
|
34 |
-- begin createTable |
|
35 |
INSERT INTO "gpkg_contents" ("table_name", "data_type", "identifier", "description", "last_change", "min_x", "min_y", "max_x", "max_y", "srs_id") VALUES ('test', 'features', 'test', '', '*', NULL, NULL, NULL, NULL, NULL) |
|
36 |
-- end createTable |
|
52 | 37 |
|
53 |
CREATE TABLE "test" ("ID" MEDIUMINT PRIMARY KEY NOT NULL, "Byte" TINYINT DEFAULT NULL, "Bool1" BOOLEAN DEFAULT NULL, "Long" BIGINT DEFAULT NULL, "Timestamp" DATETIME DEFAULT NULL, "Date" DATE DEFAULT NULL, "Time" TIME DEFAULT NULL, "Bool2" BOOLEAN DEFAULT NULL, "String" VARCHAR(30) DEFAULT NULL, "Bool3" BOOLEAN DEFAULT NULL, "Double" DOUBLE PRECISION DEFAULT NULL, "Bool4" BOOLEAN DEFAULT NULL, "Float" FLOAT DEFAULT NULL, "Bool5" BOOLEAN DEFAULT NULL, "Decimal" DECIMAL(6,3) DEFAULT NULL, "Geometry" BLOB DEFAULT NULL ); |
|
38 |
-- begin createTable |
|
39 |
CREATE TABLE "test" ("ID" MEDIUMINT PRIMARY KEY NOT NULL, "Byte" TINYINT DEFAULT NULL, "Bool1" BOOLEAN DEFAULT NULL, "Long" BIGINT DEFAULT NULL, "Timestamp" DATETIME DEFAULT NULL, "Date" DATE DEFAULT NULL, "Time" TIME DEFAULT NULL, "Bool2" BOOLEAN DEFAULT NULL, "String" VARCHAR(30) DEFAULT NULL, "Bool3" BOOLEAN DEFAULT NULL, "Double" DOUBLE PRECISION DEFAULT NULL, "Bool4" BOOLEAN DEFAULT NULL, "Float" FLOAT DEFAULT NULL, "Bool5" BOOLEAN DEFAULT NULL, "Decimal" DECIMAL(6,3) DEFAULT NULL, "Geometry" BLOB DEFAULT NULL ) |
|
40 |
-- end createTable |
|
54 | 41 |
|
55 |
INSERT INTO "main"."gpkg_geometry_columns" ("table_name", "column_name", "geometry_type_name", "srs_id", "z", "m") VALUES ('test', 'Geometry', 'POINT', '4326', '0', '0'); |
|
42 |
-- begin createTable |
|
43 |
INSERT INTO "gpkg_geometry_columns" ("table_name", "column_name", "geometry_type_name", "srs_id", "z", "m") VALUES ('test', 'Geometry', 'POINT', '4326', '0', '0') |
|
44 |
-- end createTable |
|
56 | 45 |
|
46 |
-- begin createTable |
|
57 | 47 |
CREATE TABLE IF NOT EXISTS gpkg_extensions ( |
58 | 48 |
table_name TEXT, |
59 | 49 |
column_name TEXT, |
60 | 50 |
extension_name TEXT NOT NULL, |
61 | 51 |
definition TEXT NOT NULL, |
62 | 52 |
scope TEXT NOT NULL, |
63 |
CONSTRAINT ge_tce UNIQUE (table_name, column_name, extension_name) ); |
|
53 |
CONSTRAINT ge_tce UNIQUE (table_name, column_name, extension_name) ) |
|
54 |
-- end createTable |
|
64 | 55 |
|
65 |
CREATE VIRTUAL TABLE "rtree_test_Geometry" USING rtree(id, minx, maxx, miny, maxy); |
|
56 |
-- begin createTable |
|
57 |
CREATE VIRTUAL TABLE "rtree_test_Geometry" USING rtree(id, minx, maxx, miny, maxy) |
|
58 |
-- end createTable |
|
66 | 59 |
|
60 |
-- begin createTable |
|
67 | 61 |
CREATE TRIGGER "rtree_test_Geometry_delete" AFTER DELETE ON "test" |
68 | 62 |
WHEN old."Geometry" NOT NULL |
69 | 63 |
BEGIN |
70 | 64 |
DELETE FROM "rtree_test_Geometry" WHERE ID = OLD."ID"; |
71 |
END; |
|
65 |
END |
|
66 |
-- end createTable |
|
72 | 67 |
|
68 |
-- begin createTable |
|
73 | 69 |
CREATE TRIGGER "rtree_test_Geometry_insert" AFTER INSERT ON "test" |
74 | 70 |
WHEN (new."Geometry" NOT NULL AND NOT ST_IsEmpty(NEW."Geometry")) |
75 | 71 |
BEGIN |
... | ... | |
78 | 74 |
ST_MinX(NEW."Geometry"), ST_MaxX(NEW."Geometry"), |
79 | 75 |
ST_MinY(NEW."Geometry"), ST_MaxY(NEW."Geometry") |
80 | 76 |
); |
81 |
END; |
|
77 |
END |
|
78 |
-- end createTable |
|
82 | 79 |
|
80 |
-- begin createTable |
|
83 | 81 |
CREATE TRIGGER "rtree_test_Geometry_update1" AFTER UPDATE OF "Geometry" ON "test" |
84 | 82 |
WHEN OLD."ID" = NEW."ID" AND |
85 | 83 |
(NEW."Geometry" NOTNULL AND NOT ST_IsEmpty(NEW."Geometry")) |
... | ... | |
89 | 87 |
ST_MinX(NEW."Geometry"), ST_MaxX(NEW."Geometry"), |
90 | 88 |
ST_MinY(NEW."Geometry"), ST_MaxY(NEW."Geometry") |
91 | 89 |
); |
92 |
END; |
|
90 |
END |
|
91 |
-- end createTable |
|
93 | 92 |
|
93 |
-- begin createTable |
|
94 | 94 |
CREATE TRIGGER "rtree_test_Geometry_update2" AFTER UPDATE OF "Geometry" ON "test" |
95 | 95 |
WHEN OLD."ID" = NEW."ID" AND |
96 | 96 |
(NEW."Geometry" ISNULL OR ST_IsEmpty(NEW."Geometry")) |
97 | 97 |
BEGIN |
98 | 98 |
DELETE FROM "rtree_test_Geometry" WHERE ID = OLD."ID"; |
99 |
END; |
|
99 |
END |
|
100 |
-- end createTable |
|
100 | 101 |
|
102 |
-- begin createTable |
|
101 | 103 |
CREATE TRIGGER "rtree_test_Geometry_update3" AFTER UPDATE ON "test" |
102 | 104 |
WHEN OLD."ID" != NEW."ID" AND |
103 | 105 |
(NEW."Geometry" NOTNULL AND NOT ST_IsEmpty(NEW."Geometry")) |
... | ... | |
108 | 110 |
ST_MinX(NEW."Geometry"), ST_MaxX(NEW."Geometry"), |
109 | 111 |
ST_MinY(NEW."Geometry"), ST_MaxY(NEW."Geometry") |
110 | 112 |
); |
111 |
END; |
|
113 |
END |
|
114 |
-- end createTable |
|
112 | 115 |
|
116 |
-- begin createTable |
|
113 | 117 |
CREATE TRIGGER "rtree_test_Geometry_update4" AFTER UPDATE ON "test" |
114 | 118 |
WHEN OLD."ID" != NEW."ID" AND |
115 | 119 |
(NEW."Geometry" ISNULL OR ST_IsEmpty(NEW."Geometry")) |
116 | 120 |
BEGIN |
117 | 121 |
DELETE FROM "rtree_test_Geometry" WHERE ID IN (OLD."ID", NEW."ID"); |
118 |
END; |
|
122 |
END |
|
123 |
-- end createTable |
|
119 | 124 |
|
125 |
-- begin createTable |
|
120 | 126 |
INSERT INTO "gpkg_extensions" ( |
121 | 127 |
"table_name", |
122 | 128 |
"column_name", |
... | ... | |
129 | 135 |
'gpkg_rtree_index', |
130 | 136 |
'http://www.geopackage.org/spec/#extension_rtree', |
131 | 137 |
'read-write' |
132 |
); |
|
138 |
) |
|
139 |
-- end createTable |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/resources/org/gvsig/sqlite/dal/dropTable.sql | ||
---|---|---|
1 | 1 |
|
2 | 2 |
-- Count SQL |
3 |
DELETE FROM gpkg_geometry_columns WHERE table_name = "test";
|
|
3 |
DROP TRIGGER IF EXISTS "rtree_test_Geometry_delete";
|
|
4 | 4 |
|
5 |
DELETE FROM "main"."gpkg_contents" WHERE "identifier" = 'test';
|
|
5 |
DROP TRIGGER IF EXISTS "rtree_test_Geometry_insert";
|
|
6 | 6 |
|
7 |
DELETE FROM "main"."gpkg_extensions" WHERE "table_name" = 'test';
|
|
7 |
DROP TRIGGER IF EXISTS "rtree_test_Geometry_update1";
|
|
8 | 8 |
|
9 |
DROP TRIGGER IF EXISTS "rtree_test_Geometry_update2"; |
|
10 |
|
|
11 |
DROP TRIGGER IF EXISTS "rtree_test_Geometry_update3"; |
|
12 |
|
|
13 |
DROP TRIGGER IF EXISTS "rtree_test_Geometry_update4"; |
|
14 |
|
|
15 |
DROP TABLE IF EXISTS "rtree_test_Geometry"; |
|
16 |
|
|
17 |
DROP TABLE IF EXISTS "rtree_test_Geometry_node"; |
|
18 |
|
|
19 |
DROP TABLE IF EXISTS "rtree_test_Geometry_parent"; |
|
20 |
|
|
21 |
DROP TABLE IF EXISTS "rtree_test_Geometry_rowid"; |
|
22 |
|
|
23 |
DELETE FROM "gpkg_geometry_columns" WHERE "table_name" = 'test'; |
|
24 |
|
|
25 |
DELETE FROM "gpkg_contents" WHERE "identifier" = 'test'; |
|
26 |
|
|
27 |
DELETE FROM "gpkg_extensions" WHERE "table_name" = 'test'; |
|
28 |
|
|
9 | 29 |
DROP TABLE "test"; |
30 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/resources/org/gvsig/sqlite/dal/resultSetForSetProvider.sql | ||
---|---|---|
67 | 67 |
"test"."Bool5", |
68 | 68 |
"test"."Decimal", |
69 | 69 |
"test"."Geometry", |
70 |
NVL2(COALESCE(( SELECT "countries"."ISO_A2" FROM "countries" WHERE (("test"."STRING" = "countries"."CONTINENT") AND ("countries"."LASTCENSUS" < 0)) LIMIT 1 )),TRUE,FALSE) AS "EXISTS62a964cd7bc24f409b97c03b9170408d" |
|
71 |
FROM "test" |
|
72 |
WHERE NVL2(COALESCE(( SELECT "countries"."ISO_A2" |
|
73 |
FROM "countries" |
|
74 |
WHERE (("test"."STRING" = "countries"."CONTINENT") AND ("countries"."LASTCENSUS" < 0)) |
|
75 |
LIMIT 1 )),TRUE,FALSE) |
|
70 |
EXISTS( SELECT "countries"."ISO2" |
|
71 |
FROM "countries" |
|
72 |
WHERE (("test"."STRING" = "countries"."CONTINENT") AND ("countries"."LASTCENSUS" < 0)) LIMIT 1 ) AS "EXISTS62a964cd7bc24f409b97c03b9170408d" |
|
73 |
FROM "test" |
|
74 |
WHERE EXISTS( SELECT "countries"."ISO2" |
|
75 |
FROM "countries" |
|
76 |
WHERE (("test"."STRING" = "countries"."CONTINENT") AND ("countries"."LASTCENSUS" < 0)) LIMIT 1 ) |
|
76 | 77 |
ORDER BY "test"."ID" ASC |
77 | 78 |
-- end testSubselect |
78 | 79 |
|
... | ... | |
93 | 94 |
"test"."Bool5", |
94 | 95 |
"test"."Decimal", |
95 | 96 |
"test"."Geometry", |
96 |
NVL2(COALESCE(( SELECT "test"."Long" FROM "countries" WHERE (("test"."STRING" = "countries"."CONTINENT") AND ("countries"."LASTCENSUS" < 0)) LIMIT 1 )),TRUE,FALSE) AS "EXISTS62a964cd7bc24f409b97c03b9170408d"
|
|
97 |
EXISTS( SELECT "test"."Long" FROM "countries" WHERE (("test"."STRING" = "countries"."CONTINENT") AND ("countries"."LASTCENSUS" < 0)) LIMIT 1 ) AS "EXISTS62a964cd7bc24f409b97c03b9170408d"
|
|
97 | 98 |
FROM "test" |
98 |
WHERE NVL2(COALESCE(( SELECT "test"."Long"
|
|
99 |
WHERE EXISTS( SELECT "test"."Long"
|
|
99 | 100 |
FROM "countries" |
100 | 101 |
WHERE (("test"."STRING" = "countries"."CONTINENT") AND ("countries"."LASTCENSUS" < 0)) |
101 |
LIMIT 1 )),TRUE,FALSE)
|
|
102 |
LIMIT 1 ) |
|
102 | 103 |
ORDER BY "test"."ID" ASC |
103 | 104 |
-- end testSubselect2 |
104 | 105 |
|
... | ... | |
120 | 121 |
NULL AS "Decimal", |
121 | 122 |
NULL AS "Geometry" |
122 | 123 |
FROM "test" |
123 |
WHERE NVL2(COALESCE(( SELECT "countries"."ISO_A2"
|
|
124 |
WHERE EXISTS( SELECT "countries"."ISO2"
|
|
124 | 125 |
FROM "countries" |
125 | 126 |
WHERE (("test"."STRING" = "countries"."CONTINENT") AND ("countries"."LASTCENSUS" < 0)) |
126 |
LIMIT 1 )),TRUE,FALSE)
|
|
127 |
LIMIT 1 ) |
|
127 | 128 |
GROUP BY "test"."Long" |
128 | 129 |
ORDER BY "test"."Long" ASC NULLS LAST |
129 | 130 |
-- end testGroupAndSubselect |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/resources/org/gvsig/sqlite/dal/updateTableStatistics.sql | ||
---|---|---|
1 | 1 |
|
2 | 2 |
-- UpdateTableStatistics SQL |
3 |
ANALYZE SAMPLE_SIZE 0; |
|
3 |
ANALYZE "test"; |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/resources/org/gvsig/sqlite/dal/countries.csv | ||
---|---|---|
1 |
"FIPS/String/set/size=2/set/order=0";"ISO2/String/set/size=2/set/order=10";"ISO3/String/set/size=3/set/order=20";"UN/Decimal/set/precision=3/set/scale=0/set/roundMode=4/set/order=30";"NAME/String/set/size=50/set/order=40";"AREA/Integer/set/order=50";"POP2005/Integer/set/order=60";"REGION/Decimal/set/precision=3/set/scale=0/set/roundMode=4/set/order=70";"SUBREGION/Decimal/set/precision=3/set/scale=0/set/roundMode=4/set/order=80";"LON/Decimal/set/precision=6/set/scale=-1/set/roundMode=4/set/order=90";"LAT/Decimal/set/precision=5/set/scale=-1/set/roundMode=4/set/order=100";"CONTINENT/String/set/size=45";"LASTCENSUS/Decimal/set/precision=3/set/scale=0/set/roundMode=4/set/order=30" |
|
2 |
"AC";"AG";"ATG";"28";"Antigua and Barbuda";"44";"83039";"19";"29";"-61.783";"17.078";; |
|
3 |
"AG";"DZ";"DZA";"12";"Algeria";"238174";"32854159";"2";"15";"2.632";"28.163";; |
|
4 |
"AJ";"AZ";"AZE";"31";"Azerbaijan";"8260";"8352021";"142";"145";"47.395";"40.430";; |
|
5 |
"AL";"AL";"ALB";"8";"Albania";"2740";"3153731";"150";"39";"20.068";"41.143";; |
|
6 |
"AM";"AM";"ARM";"51";"Armenia";"2820";"3017661";"142";"145";"44.563";"40.534";; |
|
7 |
"AO";"AO";"AGO";"24";"Angola";"124670";"16095214";"2";"17";"17.544";"-12.296";; |
|
8 |
"AQ";"AS";"ASM";"16";"American Samoa";"20";"64051";"9";"61";"-170.730";"-14.318";; |
|
9 |
"AR";"AR";"ARG";"32";"Argentina";"273669";"38747148";"19";"5";"-65.167";"-35.377";; |
|
10 |
"AS";"AU";"AUS";"36";"Australia";"768230";"20310208";"9";"53";"136.189";"-24.973";; |
|
11 |
"BA";"BH";"BHR";"48";"Bahrain";"71";"724788";"142";"145";"50.562";"26.019";; |
|
12 |
"BB";"BB";"BRB";"52";"Barbados";"43";"291933";"19";"29";"-59.559";"13.153";; |
|
13 |
"BD";"BM";"BMU";"60";"Bermuda";"5";"64174";"19";"21";"-64.709";"32.336";; |
|
14 |
"BF";"BS";"BHS";"44";"Bahamas";"1001";"323295";"19";"29";"-78.014";"24.628";; |
|
15 |
"BG";"BD";"BGD";"50";"Bangladesh";"13017";"15328112";"142";"34";"89.941";"24.218";; |
|
16 |
"BH";"BZ";"BLZ";"84";"Belize";"2281";"275546";"19";"13";"-88.602";"17.219";; |
|
17 |
"BK";"BA";"BIH";"70";"Bosnia and Herzegovina";"5120";"3915238";"150";"39";"17.786";"44.169";; |
|
18 |
"BL";"BO";"BOL";"68";"Bolivia";"108438";"9182015";"19";"5";"-64.671";"-16.715";; |
|
19 |
"BM";"MM";"MMR";"104";"Burma";"65755";"47967266";"142";"35";"96.041";"21.718";; |
|
20 |
"BN";"BJ";"BEN";"204";"Benin";"11062";"8490301";"2";"11";"2.469";"10.541";; |
|
21 |
"BP";"SB";"SLB";"90";"Solomon Islands";"2799";"472419";"9";"54";"160.109";"-9.611";; |
|
22 |
"BR";"BR";"BRA";"76";"Brazil";"845942";"186830759";"19";"5";"-53.089";"-10.772";; |
|
23 |
"BU";"BG";"BGR";"100";"Bulgaria";"11063";"7744591";"150";"151";"25.231";"42.761";; |
|
24 |
"BX";"BN";"BRN";"96";"Brunei Darussalam";"527";"373831";"142";"35";"114.591";"4.468";; |
|
25 |
"CA";"CA";"CAN";"124";"Canada";"909351";"32270507";"19";"21";"-109.433";"59.081";; |
|
26 |
"CB";"KH";"KHM";"116";"Cambodia";"17652";"13955507";"142";"35";"104.564";"12.714";; |
|
27 |
"CE";"LK";"LKA";"144";"Sri Lanka";"6463";"19120763";"142";"34";"80.704";"7.612";; |
|
28 |
"CF";"CG";"COG";"178";"Congo";"34150";"3609851";"2";"17";"15.986";"-0.055";; |
|
29 |
"CG";"CD";"COD";"180";"Democratic Republic of the Congo";"226705";"58740547";"2";"17";"23.654";"-2.876";; |
|
30 |
"BY";"BI";"BDI";"108";"Burundi";"2568";"7858791";"2";"14";"29.887";"-3.356";; |
|
31 |
"CH";"CN";"CHN";"156";"China";"932743";"1312978855";"142";"30";"106.514";"33.420";; |
|
32 |
"AF";"AF";"AFG";"4";"Afghanistan";"65209";"25067407";"142";"34";"65.216";"33.677";; |
|
33 |
"BT";"BT";"BTN";"64";"Bhutan";"4700";"637013";"142";"34";"90.429";"27.415";; |
|
34 |
"CI";"CL";"CHL";"152";"Chile";"74880";"16295102";"19";"5";"-69.433";"-23.389";; |
|
35 |
"CJ";"KY";"CYM";"136";"Cayman Islands";"26";"45591";"19";"29";"-81.198";"19.314";; |
|
36 |
"CM";"CM";"CMR";"120";"Cameroon";"46540";"17795149";"2";"17";"12.277";"5.133";; |
|
37 |
"CD";"TD";"TCD";"148";"Chad";"125920";"10145609";"2";"17";"18.665";"15.361";; |
|
38 |
"CN";"KM";"COM";"174";"Comoros";"223";"797902";"2";"14";"43.337";"-11.758";; |
|
39 |
"CO";"CO";"COL";"170";"Colombia";"103870";"4494579";"19";"5";"-73.076";"3.900";; |
|
40 |
"CS";"CR";"CRI";"188";"Costa Rica";"5106";"4327228";"19";"13";"-83.946";"9.971";; |
|
41 |
"CT";"CF";"CAF";"140";"Central African Republic";"62298";"4191429";"2";"17";"20.483";"6.571";; |
|
42 |
"CU";"CU";"CUB";"192";"Cuba";"10982";"11259905";"19";"29";"-77.781";"21.297";; |
|
43 |
"CV";"CV";"CPV";"132";"Cape Verde";"403";"506807";"2";"11";"-23.634";"15.071";; |
|
44 |
"CW";"CK";"COK";"184";"Cook Islands";"24";"13984";"9";"61";"-159.782";"-21.219";; |
|
45 |
"CY";"CY";"CYP";"196";"Cyprus";"924";"836321";"142";"145";"33.219";"35.043";; |
|
46 |
"DA";"DK";"DNK";"208";"Denmark";"4243";"5416945";"150";"154";"9.264";"56.058";; |
|
47 |
"DJ";"DJ";"DJI";"262";"Djibouti";"2318";"804206";"2";"14";"42.516";"11.900";; |
|
48 |
"DO";"DM";"DMA";"212";"Dominica";"75";"67827";"19";"29";"-61.356";"15.475";; |
|
49 |
"DR";"DO";"DOM";"214";"Dominican Republic";"4838";"9469601";"19";"29";"-70.729";"19.015";; |
|
50 |
"EC";"EC";"ECU";"218";"Ecuador";"27684";"13060993";"19";"5";"-78.497";"-1.385";; |
|
51 |
"EG";"EG";"EGY";"818";"Egypt";"99545";"72849793";"2";"15";"29.872";"26.494";; |
|
52 |
"EI";"IE";"IRL";"372";"Ireland";"6889";"4143294";"150";"154";"-8.152";"53.177";; |
|
53 |
"EK";"GQ";"GNQ";"226";"Equatorial Guinea";"2805";"484098";"2";"17";"10.488";"1.607";; |
|
54 |
"EN";"EE";"EST";"233";"Estonia";"4239";"1344312";"150";"154";"25.793";"58.674";; |
|
55 |
"ER";"ER";"ERI";"232";"Eritrea";"10100";"4526722";"2";"14";"38.219";"16.045";; |
|
56 |
"ES";"SV";"SLV";"222";"El Salvador";"2072";"6668356";"19";"13";"-88.866";"13.736";; |
|
57 |
"ET";"ET";"ETH";"231";"Ethiopia";"100000";"78985857";"2";"14";"39.616";"8.626";; |
|
58 |
"AU";"AT";"AUT";"40";"Austria";"8245";"8291979";"150";"155";"14.912";"47.683";; |
|
59 |
"EZ";"CZ";"CZE";"203";"Czech Republic";"7727";"10191762";"150";"151";"15.338";"49.743";; |
|
60 |
"FG";"GF";"GUF";"254";"French Guiana";"8815";"192099";"19";"5";"-53.241";"3.924";; |
|
61 |
"FI";"FI";"FIN";"246";"Finland";"30459";"5246004";"150";"154";"26.272";"64.504";; |
|
62 |
"FJ";"FJ";"FJI";"242";"Fiji";"1827";"828046";"9";"54";"177.974";"-17.819";; |
|
63 |
"FK";"FK";"FLK";"238";"Falkland Islands (Malvinas)";"1217";"2975";"19";"5";"-58.694";"-51.665";; |
|
64 |
"FM";"FM";"FSM";"583";"Micronesia, Federated States of";"70";"110058";"9";"57";"158.235";"6.883";; |
|
65 |
"FP";"PF";"PYF";"258";"French Polynesia";"366";"255632";"9";"61";"-149.462";"-17.626";; |
|
66 |
"FR";"FR";"FRA";"250";"France";"55010";"60990544";"150";"155";"2.550";"46.565";; |
|
67 |
"GA";"GM";"GMB";"270";"Gambia";"1000";"1617029";"2";"11";"-15.386";"13.453";; |
|
68 |
"GB";"GA";"GAB";"266";"Gabon";"25767";"1290693";"2";"17";"11.797";"-0.591";; |
|
69 |
"GG";"GE";"GEO";"268";"Georgia";"6949";"4473409";"142";"145";"43.518";"42.176";; |
|
70 |
"GH";"GH";"GHA";"288";"Ghana";"22754";"2253501";"2";"11";"-1.207";"7.960";; |
|
71 |
"GJ";"GD";"GRD";"308";"Grenada";"34";"105237";"19";"29";"-61.678";"12.118";; |
|
72 |
"GL";"GL";"GRL";"304";"Greenland";"41045";"57475";"19";"21";"-41.391";"74.719";; |
|
73 |
"GM";"DE";"DEU";"276";"Germany";"34895";"82652369";"150";"155";"9.851";"51.110";; |
|
74 |
"GQ";"GU";"GUM";"316";"Guam";"55";"16857";"9";"57";"144.707";"13.385";; |
|
75 |
"GR";"GR";"GRC";"300";"Greece";"12890";"11099737";"150";"39";"21.766";"39.666";; |
|
76 |
"GT";"GT";"GTM";"320";"Guatemala";"10843";"12709564";"19";"13";"-90.398";"15.256";; |
|
77 |
"GV";"GN";"GIN";"324";"Guinea";"24572";"9002656";"2";"11";"-10.942";"10.439";; |
|
78 |
"GY";"GY";"GUY";"328";"Guyana";"19685";"739472";"19";"5";"-58.974";"4.792";; |
|
79 |
"HA";"HT";"HTI";"332";"Haiti";"2756";"9296291";"19";"29";"-72.278";"19.142";; |
|
80 |
"HO";"HN";"HND";"340";"Honduras";"11189";"683411";"19";"13";"-86.863";"14.819";; |
|
81 |
"HR";"HR";"HRV";"191";"Croatia";"5592";"455149";"150";"39";"16.693";"45.723";; |
|
82 |
"HU";"HU";"HUN";"348";"Hungary";"9210";"10086387";"150";"151";"19.134";"47.070";; |
|
83 |
"IC";"IS";"ISL";"352";"Iceland";"10025";"295732";"150";"154";"-18.480";"64.764";; |
|
84 |
"IN";"IN";"IND";"356";"India";"297319";"1134403141";"142";"34";"78.500";"21.000";; |
|
85 |
"IR";"IR";"IRN";"364";"Iran (Islamic Republic of)";"163620";"69420607";"142";"34";"54.301";"32.565";; |
|
86 |
"IS";"IL";"ISR";"376";"Israel";"2171";"6692037";"142";"145";"34.851";"31.026";; |
|
87 |
"IT";"IT";"ITA";"380";"Italy";"29411";"5864636";"150";"39";"12.800";"42.700";; |
|
88 |
"IV";"CI";"CIV";"384";"Cote d'Ivoire";"31800";"18584701";"2";"11";"-5.556";"7.632";; |
|
89 |
"IZ";"IQ";"IRQ";"368";"Iraq";"43737";"27995984";"142";"145";"43.772";"33.048";; |
|
90 |
"JA";"JP";"JPN";"392";"Japan";"36450";"127896740";"142";"30";"139.068";"36.491";; |
|
91 |
"JM";"JM";"JAM";"388";"Jamaica";"1083";"2682469";"19";"29";"-77.320";"18.151";; |
|
92 |
"JO";"JO";"JOR";"400";"Jordan";"8824";"5544066";"142";"145";"36.319";"30.703";; |
|
93 |
"KE";"KE";"KEN";"404";"Kenya";"56914";"35598952";"2";"14";"37.858";"0.530";; |
|
94 |
"KG";"KG";"KGZ";"417";"Kyrgyzstan";"19180";"5203547";"142";"143";"74.555";"41.465";; |
|
95 |
"KN";"KP";"PRK";"408";"Korea, Democratic People's Republic of";"12041";"23615611";"142";"30";"126.451";"39.778";; |
|
96 |
"KR";"KI";"KIR";"296";"Kiribati";"73";"92003";"9";"57";"175.036";"-1.508";; |
|
97 |
"KS";"KR";"KOR";"410";"Korea, Republic of";"9873";"47869837";"142";"30";"128.103";"36.504";; |
|
98 |
"KU";"KW";"KWT";"414";"Kuwait";"1782";"2700";"142";"145";"47.376";"29.476";; |
|
99 |
"KZ";"KZ";"KAZ";"398";"Kazakhstan";"269970";"15210609";"142";"143";"67.301";"48.160";; |
|
100 |
"LA";"LA";"LAO";"418";"Lao People's Democratic Republic";"23080";"566391";"142";"35";"102.471";"19.905";; |
|
101 |
"LE";"LB";"LBN";"422";"Lebanon";"1023";"401074";"142";"145";"35.888";"33.920";; |
|
102 |
"LG";"LV";"LVA";"428";"Latvia";"6205";"2301793";"150";"154";"25.641";"56.858";; |
|
103 |
"BO";"BY";"BLR";"112";"Belarus";"20748";"9795287";"150";"151";"28.047";"53.540";; |
|
104 |
"LH";"LT";"LTU";"440";"Lithuania";"6268";"3425077";"150";"154";"23.897";"55.336";; |
|
105 |
"LI";"LR";"LBR";"430";"Liberia";"9632";"3441796";"2";"11";"-9.657";"6.682";; |
|
106 |
"LO";"SK";"SVK";"703";"Slovakia";"4808";"5386995";"150";"151";"19.491";"48.707";; |
|
107 |
"LS";"LI";"LIE";"438";"Liechtenstein";"16";"34598";"150";"155";"9.555";"47.153";; |
|
108 |
"LY";"LY";"LBY";"434";"Libyan Arab Jamahiriya";"175954";"5918217";"2";"15";"18.023";"27.044";; |
|
109 |
"MA";"MG";"MDG";"450";"Madagascar";"58154";"18642586";"2";"14";"46.706";"-19.374";; |
|
110 |
"MB";"MQ";"MTQ";"474";"Martinique";"106";"395896";"19";"29";"-61.021";"14.653";; |
|
111 |
"MG";"MN";"MNG";"496";"Mongolia";"156650";"2580704";"142";"30";"102.876";"46.056";; |
|
112 |
"MH";"MS";"MSR";"500";"Montserrat";"10";"5628";"19";"29";"-62.187";"16.736";; |
|
113 |
"MK";"MK";"MKD";"807";"The former Yugoslav Republic of Macedonia";"2543";"2033655";"150";"39";"21.698";"41.600";; |
|
114 |
"ML";"ML";"MLI";"466";"Mali";"122019";"1161109";"2";"11";"-3.524";"17.350";; |
|
115 |
"MO";"MA";"MAR";"504";"Morocco";"44630";"30494991";"2";"15";"-5.758";"32.706";; |
|
116 |
"MP";"MU";"MUS";"480";"Mauritius";"203";"1241173";"2";"14";"57.583";"-20.255";; |
|
117 |
"MR";"MR";"MRT";"478";"Mauritania";"102522";"2963105";"2";"11";"-10.332";"20.260";; |
|
118 |
"MT";"MT";"MLT";"470";"Malta";"32";"402617";"150";"39";"14.442";"35.890";; |
|
119 |
"MU";"OM";"OMN";"512";"Oman";"30950";"2507042";"142";"145";"57.407";"21.656";; |
|
120 |
"MV";"MV";"MDV";"462";"Maldives";"30";"295297";"142";"34";"72.920";"3.548";; |
|
121 |
"MX";"MX";"MEX";"484";"Mexico";"190869";"104266392";"19";"13";"-102.535";"23.951";; |
|
122 |
"MY";"MY";"MYS";"458";"Malaysia";"32855";"25652985";"142";"35";"102.195";"4.201";; |
|
123 |
"MZ";"MZ";"MOZ";"508";"Mozambique";"78409";"20532675";"2";"14";"37.923";"-14.422";; |
|
124 |
"MI";"MW";"MWI";"454";"Malawi";"9408";"13226091";"2";"14";"33.808";"-13.400";; |
|
125 |
"NC";"NC";"NCL";"540";"New Caledonia";"1828";"234185";"9";"54";"165.447";"-21.359";; |
|
126 |
"NE";"NU";"NIU";"570";"Niue";"26";"1632";"9";"61";"-169.869";"-19.052";; |
|
127 |
"NG";"NE";"NER";"562";"Niger";"126670";"1326419";"2";"11";"9.398";"17.426";; |
|
128 |
"AA";"AW";"ABW";"533";"Aruba";"0";"102897";"19";"29";"-69.977";"12.517";; |
|
129 |
"AV";"AI";"AIA";"660";"Anguilla";"0";"12256";"19";"29";"-63.032";"18.237";; |
|
130 |
"BE";"BE";"BEL";"56";"Belgium";"0";"10398049";"150";"155";"4.664";"50.643";; |
|
131 |
"HK";"HK";"HKG";"344";"Hong Kong";"0";"7057418";"142";"30";"114.129";"22.423";; |
|
132 |
"CQ";"MP";"MNP";"580";"Northern Mariana Islands";"0";"80258";"9";"57";"145.623";"15.005";; |
|
133 |
"FO";"FO";"FRO";"234";"Faroe Islands";"0";"48205";"150";"154";"-6.864";"62.050";; |
|
134 |
"AN";"AD";"AND";"20";"Andorra";"0";"73483";"150";"39";"1.576";"42.549";; |
|
135 |
"GI";"GI";"GIB";"292";"Gibraltar";"0";"291";"150";"39";"-5.345";"36.138";; |
|
136 |
"IM";"IM";"IMN";"833";"Isle of Man";"0";"78357";"150";"154";"-4.527";"54.229";; |
|
137 |
"LU";"LU";"LUX";"442";"Luxembourg";"0";"456613";"150";"155";"6.088";"49.771";; |
|
138 |
"MC";"MO";"MAC";"446";"Macau";"0";"47309";"142";"30";"113.545";"22.200";; |
|
139 |
"MN";"MC";"MCO";"492";"Monaco";"0";"325";"150";"155";"7.412";"43.750";; |
|
140 |
;"PS";"PSE";"275";"Palestine";"0";"3762005";"142";"145";"35.278";"32.037";; |
|
141 |
"MJ";"ME";"MNE";"499";"Montenegro";"0";"607969";"150";"39";"19.254";"42.792";; |
|
142 |
"MF";"YT";"MYT";"175";"Mayotte";"0";"0";"2";"14";"45.155";"-12.777";; |
|
143 |
;"AX";"ALA";"248";"Ã…land Islands";"0";"0";"150";"154";"19.952";"60.198";; |
|
144 |
"NF";"NF";"NFK";"574";"Norfolk Island";"0";"0";"9";"53";"167.953";"-29.037";; |
|
145 |
"CK";"CC";"CCK";"166";"Cocos (Keeling) Islands";"1";"0";"0";"0";"96.839";"-12.173";; |
|
146 |
"AY";"AQ";"ATA";"10";"Antarctica";"0";"0";"0";"0";"21.304";"-80.446";; |
|
147 |
"BV";"BV";"BVT";"74";"Bouvet Island";"0";"0";"0";"0";"3.412";"-54.422";; |
|
148 |
"FS";"TF";"ATF";"260";"French Southern and Antarctic Lands";"0";"0";"0";"0";"69.117";"-49.302";; |
|
149 |
"HM";"HM";"HMD";"334";"Heard Island and McDonald Islands";"0";"0";"0";"0";"73.507";"-53.111";; |
|
150 |
"IO";"IO";"IOT";"86";"British Indian Ocean Territory";"0";"0";"0";"0";"72.416";"-7.335";; |
|
151 |
"KT";"CX";"CXR";"162";"Christmas Island";"0";"0";"0";"0";"105.704";"-10.444";; |
|
152 |
;"UM";"UMI";"581";"United States Minor Outlying Islands";"0";"0";"0";"0";"-160.027";"-0.385";; |
|
153 |
"NH";"VU";"VUT";"548";"Vanuatu";"1219";"215366";"9";"54";"166.899";"-15.376";; |
|
154 |
"NI";"NG";"NGA";"566";"Nigeria";"91077";"141356083";"2";"11";"8.105";"9.594";; |
|
155 |
"NL";"NL";"NLD";"528";"Netherlands";"3388";"1632769";"150";"155";"5.389";"52.077";; |
|
156 |
"NO";"NO";"NOR";"578";"Norway";"30625";"4638836";"150";"154";"8.740";"61.152";; |
|
157 |
"NP";"NP";"NPL";"524";"Nepal";"14300";"27093656";"142";"34";"83.939";"28.253";; |
|
158 |
"NR";"NR";"NRU";"520";"Nauru";"2";"10111";"9";"57";"166.930";"-0.522";; |
|
159 |
"NS";"SR";"SUR";"740";"Suriname";"15600";"452468";"19";"5";"-55.912";"4.127";; |
|
160 |
"NU";"NI";"NIC";"558";"Nicaragua";"12140";"5462539";"19";"13";"-85.034";"12.840";; |
|
161 |
"NZ";"NZ";"NZL";"554";"New Zealand";"26799";"4097112";"9";"53";"172.235";"-42.634";; |
|
162 |
"PA";"PY";"PRY";"600";"Paraguay";"39730";"5904342";"19";"5";"-58.391";"-23.236";; |
|
163 |
"PE";"PE";"PER";"604";"Peru";"128000";"27274266";"19";"5";"-75.552";"-9.326";; |
|
164 |
"PK";"PK";"PAK";"586";"Pakistan";"77088";"158080591";"142";"34";"69.386";"29.967";; |
|
165 |
"PL";"PL";"POL";"616";"Poland";"30629";"38195558";"150";"151";"19.401";"52.125";; |
|
166 |
"PM";"PA";"PAN";"591";"Panama";"7443";"3231502";"19";"13";"-80.920";"8.384";; |
|
167 |
"PO";"PT";"PRT";"620";"Portugal";"9150";"10528226";"150";"39";"-8.058";"40.309";; |
|
168 |
"PP";"PG";"PNG";"598";"Papua New Guinea";"45286";"6069715";"9";"54";"143.459";"-5.949";; |
|
169 |
"PU";"GW";"GNB";"624";"Guinea-Bissau";"2812";"1596929";"2";"11";"-14.651";"12.125";; |
|
170 |
"QA";"QA";"QAT";"634";"Qatar";"1100";"796186";"142";"145";"51.191";"25.316";; |
|
171 |
"RE";"RE";"REU";"638";"Reunion";"250";"785159";"2";"14";"55.538";"-21.122";; |
|
172 |
"RO";"RO";"ROU";"642";"Romania";"22987";"21627557";"150";"151";"24.969";"45.844";; |
|
173 |
"MD";"MD";"MDA";"498";"Republic of Moldova";"3288";"3876661";"150";"151";"28.599";"47.193";; |
|
174 |
"RP";"PH";"PHL";"608";"Philippines";"29817";"84566163";"142";"35";"122.466";"11.118";; |
|
175 |
"RQ";"PR";"PRI";"630";"Puerto Rico";"887";"3946779";"19";"29";"-66.466";"18.221";; |
|
176 |
"RS";"RU";"RUS";"643";"Russia";"1638094";"143953092";"150";"151";"96.689";"61.988";; |
|
177 |
"RW";"RW";"RWA";"646";"Rwanda";"2467";"9233793";"2";"14";"29.917";"-1.998";; |
|
178 |
"SA";"SA";"SAU";"682";"Saudi Arabia";"214969";"2361236";"142";"145";"44.585";"24.023";; |
|
179 |
"SC";"KN";"KNA";"659";"Saint Kitts and Nevis";"36";"49138";"19";"29";"-62.769";"17.340";; |
|
180 |
"SE";"SC";"SYC";"690";"Seychelles";"46";"85532";"2";"14";"55.474";"-4.647";; |
|
181 |
"SF";"ZA";"ZAF";"710";"South Africa";"121447";"47938663";"2";"18";"23.121";"-30.558";; |
|
182 |
"LT";"LS";"LSO";"426";"Lesotho";"3035";"1980831";"2";"18";"28.243";"-29.581";; |
|
183 |
"BC";"BW";"BWA";"72";"Botswana";"56673";"1835938";"2";"18";"23.815";"-22.182";; |
|
184 |
"SG";"SN";"SEN";"686";"Senegal";"19253";"1177034";"2";"11";"-14.881";"15.013";; |
|
185 |
"SI";"SI";"SVN";"705";"Slovenia";"2014";"1999425";"150";"39";"14.827";"46.124";; |
|
186 |
"SL";"SL";"SLE";"694";"Sierra Leone";"7162";"5586403";"2";"11";"-11.792";"8.560";; |
|
187 |
"SN";"SG";"SGP";"702";"Singapore";"67";"4327468";"142";"35";"103.808";"1.351";; |
|
188 |
"SO";"SO";"SOM";"706";"Somalia";"62734";"8196395";"2";"14";"48.316";"9.774";; |
|
189 |
"SP";"ES";"ESP";"724";"Spain";"49904";"43397491";"150";"39";"-3.649";"40.227";; |
|
190 |
"ST";"LC";"LCA";"662";"Saint Lucia";"61";"16124";"19";"29";"-60.969";"13.898";; |
|
191 |
"SU";"SD";"SDN";"736";"Sudan";"237600";"36899747";"2";"15";"30.050";"13.832";; |
|
192 |
"SW";"SE";"SWE";"752";"Sweden";"41033";"9038049";"150";"154";"15.270";"62.011";; |
|
193 |
"SY";"SY";"SYR";"760";"Syrian Arab Republic";"18378";"18893881";"142";"145";"38.506";"35.013";; |
|
194 |
"SZ";"CH";"CHE";"756";"Switzerland";"4000";"7424389";"150";"155";"7.908";"46.861";; |
|
195 |
"TD";"TT";"TTO";"780";"Trinidad and Tobago";"513";"1323722";"19";"29";"-61.253";"10.468";; |
|
196 |
"TH";"TH";"THA";"764";"Thailand";"51089";"63002911";"142";"35";"100.844";"15.700";; |
|
197 |
"TI";"TJ";"TJK";"762";"Tajikistan";"13996";"6550213";"142";"143";"69.420";"38.665";; |
|
198 |
"TL";"TK";"TKL";"772";"Tokelau";"1";"1401";"9";"61";"-171.853";"-9.193";; |
|
199 |
"TN";"TO";"TON";"776";"Tonga";"72";"99361";"9";"61";"-175.185";"-21.202";; |
|
200 |
"TO";"TG";"TGO";"768";"Togo";"5439";"6238572";"2";"11";"1.081";"8.799";; |
|
201 |
"TP";"ST";"STP";"678";"Sao Tome and Principe";"96";"152622";"2";"17";"6.629";"0.201";; |
|
202 |
"TS";"TN";"TUN";"788";"Tunisia";"15536";"10104685";"2";"15";"9.596";"35.383";; |
|
203 |
"TU";"TR";"TUR";"792";"Turkey";"76963";"72969723";"142";"145";"35.179";"39.061";; |
|
204 |
"TV";"TV";"TUV";"798";"Tuvalu";"3";"10441";"9";"61";"179.219";"-8.514";; |
|
205 |
"TX";"TM";"TKM";"795";"Turkmenistan";"46993";"4833266";"142";"143";"59.384";"39.122";; |
|
206 |
"TZ";"TZ";"TZA";"834";"United Republic of Tanzania";"88359";"38477873";"2";"14";"34.823";"-6.270";; |
|
207 |
"UG";"UG";"UGA";"800";"Uganda";"19710";"28947181";"2";"14";"32.386";"1.280";; |
|
208 |
"UK";"GB";"GBR";"826";"United Kingdom";"24193";"60244834";"150";"154";"-1.600";"53.000";; |
|
209 |
"UP";"UA";"UKR";"804";"Ukraine";"57935";"46917544";"150";"151";"31.388";"49.016";; |
|
210 |
"US";"US";"USA";"840";"United States";"915896";"299846449";"19";"21";"-98.606";"39.622";; |
|
211 |
"UV";"BF";"BFA";"854";"Burkina Faso";"27360";"13933363";"2";"11";"-1.740";"12.278";; |
|
212 |
"UY";"UY";"URY";"858";"Uruguay";"17502";"3325727";"19";"5";"-56.012";"-32.800";; |
|
213 |
"UZ";"UZ";"UZB";"860";"Uzbekistan";"42540";"26593123";"142";"143";"63.170";"41.750";; |
|
214 |
"VC";"VC";"VCT";"670";"Saint Vincent and the Grenadines";"39";"119137";"19";"29";"-61.194";"13.248";; |
|
215 |
"VE";"VE";"VEN";"862";"Venezuela";"88205";"26725573";"19";"5";"-66.166";"7.125";; |
|
216 |
"VI";"VG";"VGB";"92";"British Virgin Islands";"15";"22016";"19";"29";"-64.390";"18.483";; |
|
217 |
"VM";"VN";"VNM";"704";"Viet Nam";"32549";"85028643";"142";"35";"105.314";"21.491";; |
|
218 |
"VQ";"VI";"VIR";"850";"United States Virgin Islands";"35";"111408";"19";"29";"-64.785";"17.741";; |
|
219 |
"WA";"NA";"NAM";"516";"Namibia";"82329";"2019677";"2";"18";"17.218";"-22.133";; |
|
220 |
"WF";"WF";"WLF";"876";"Wallis and Futuna Islands";"14";"15079";"9";"61";"-178.131";"-14.289";; |
|
221 |
"WS";"WS";"WSM";"882";"Samoa";"283";"183845";"9";"61";"-172.414";"-13.652";; |
|
222 |
"WZ";"SZ";"SWZ";"748";"Swaziland";"1720";"1124529";"2";"18";"31.497";"-26.562";; |
|
223 |
"YM";"YE";"YEM";"887";"Yemen";"52797";"21095679";"142";"145";"48.355";"15.807";; |
|
224 |
"ZA";"ZM";"ZMB";"894";"Zambia";"74339";"11478317";"2";"14";"26.320";"-14.614";; |
|
225 |
"ZI";"ZW";"ZWE";"716";"Zimbabwe";"38685";"13119679";"2";"14";"29.872";"-19.000";; |
|
226 |
"ID";"ID";"IDN";"360";"Indonesia";"181157";"226063044";"142";"35";"114.252";"-0.976";; |
|
227 |
"GP";"GP";"GLP";"312";"Guadeloupe";"169";"438403";"19";"29";"-61.441";"16.286";; |
|
228 |
"NT";"AN";"ANT";"530";"Netherlands Antilles";"80";"186392";"19";"29";"-68.870";"12.123";; |
|
229 |
"AE";"AE";"ARE";"784";"United Arab Emirates";"8360";"4104291";"142";"145";"54.163";"23.549";; |
|
230 |
"TT";"TL";"TLS";"626";"Timor-Leste";"1487";"1067285";"142";"35";"125.878";"-8.822";; |
|
231 |
"PC";"PN";"PCN";"612";"Pitcairn Islands";"0";"5";"9";"61";"-128.316";"-24.366";; |
|
232 |
"PS";"PW";"PLW";"585";"Palau";"0";"20127";"9";"57";"134.570";"7.501";; |
|
233 |
"RM";"MH";"MHL";"584";"Marshall Islands";"0";"5672";"9";"57";"168.963";"7.595";; |
|
234 |
"SB";"PM";"SPM";"666";"Saint Pierre and Miquelon";"0";"6346";"19";"21";"-56.325";"47.042";; |
|
235 |
"SH";"SH";"SHN";"654";"Saint Helena";"0";"6399";"2";"11";"-5.710";"-15.953";; |
|
236 |
"SM";"SM";"SMR";"674";"San Marino";"0";"30214";"150";"39";"12.460";"43.942";; |
|
237 |
"TK";"TC";"TCA";"796";"Turks and Caicos Islands";"0";"24459";"19";"29";"-71.950";"21.902";; |
|
238 |
"WI";"EH";"ESH";"732";"Western Sahara";"0";"440428";"2";"15";"-13.706";"24.554";; |
|
239 |
"RB";"RS";"SRB";"688";"Serbia";"0";"9863026";"150";"39";"20.806";"44.032";; |
|
240 |
"VT";"VA";"VAT";"336";"Holy See (Vatican City)";"0";"783";"150";"39";"12.451";"41.904";; |
|
241 |
"SV";"SJ";"SJM";"744";"Svalbard";"0";"0";"150";"154";"18.374";"78.830";; |
|
242 |
"RN";"MF";"MAF";"663";"Saint Martin";"0";"0";"19";"29";"-63.041";"18.094";; |
|
243 |
"TB";"BL";"BLM";"652";"Saint Barthelemy";"0";"0";"19";"29";"-63.043";"18.040";; |
|
244 |
"GK";"GG";"GGY";"831";"Guernsey";"0";"0";"150";"154";"-2.576";"49.459";; |
|
245 |
"JE";"JE";"JEY";"832";"Jersey";"0";"0";"150";"154";"-2.129";"49.219";; |
|
246 |
"SX";"GS";"SGS";"239";"South Georgia South Sandwich Islands";"0";"0";"0";"0";"-36.891";"-54.209";; |
|
247 |
"TW";"TW";"TWN";"158";"Taiwan";"0";"0";"0";"0";"120.946";"23.754";; |
|
1 |
FIPS/String/set/size=2/set/order=0;ISO2/String/set/size=2/set/order=10;ISO3/String/set/size=3/set/order=20;UN/Decimal/set/precision=3/set/scale=0/set/roundMode=4/set/order=30;NAME/String/set/size=50/set/order=40;AREA/Integer/set/order=50;POP2005/Integer/set/order=60;REGION/Decimal/set/precision=3/set/scale=0/set/roundMode=4/set/order=70;SUBREGION/Decimal/set/precision=3/set/scale=0/set/roundMode=4/set/order=80;LON/Decimal/set/precision=6/set/scale=-1/set/roundMode=4/set/order=90;LAT/Decimal/set/precision=5/set/scale=-1/set/roundMode=4/set/order=100;CONTINENT/String/set/size=45;LASTCENSUS/Decimal/set/precision=3/set/scale=0/set/roundMode=4/set/order=30 |
|
2 |
AC;AG;ATG;28;Antigua and Barbuda;44;83039;19;29;-61.783;17.078;; |
|
3 |
AG;DZ;DZA;12;Algeria;238174;32854159;2;15;2.632;28.163;; |
|
4 |
AJ;AZ;AZE;31;Azerbaijan;8260;8352021;142;145;47.395;40.430;; |
|
5 |
AL;AL;ALB;8;Albania;2740;3153731;150;39;20.068;41.143;; |
|
6 |
AM;AM;ARM;51;Armenia;2820;3017661;142;145;44.563;40.534;; |
|
7 |
AO;AO;AGO;24;Angola;124670;16095214;2;17;17.544;-12.296;; |
|
8 |
AQ;AS;ASM;16;American Samoa;20;64051;9;61;-170.730;-14.318;; |
|
9 |
AR;AR;ARG;32;Argentina;273669;38747148;19;5;-65.167;-35.377;; |
|
10 |
AS;AU;AUS;36;Australia;768230;20310208;9;53;136.189;-24.973;; |
|
11 |
BA;BH;BHR;48;Bahrain;71;724788;142;145;50.562;26.019;; |
|
12 |
BB;BB;BRB;52;Barbados;43;291933;19;29;-59.559;13.153;; |
|
13 |
BD;BM;BMU;60;Bermuda;5;64174;19;21;-64.709;32.336;; |
|
14 |
BF;BS;BHS;44;Bahamas;1001;323295;19;29;-78.014;24.628;; |
|
15 |
BG;BD;BGD;50;Bangladesh;13017;15328112;142;34;89.941;24.218;; |
|
16 |
BH;BZ;BLZ;84;Belize;2281;275546;19;13;-88.602;17.219;; |
|
17 |
BK;BA;BIH;70;Bosnia and Herzegovina;5120;3915238;150;39;17.786;44.169;; |
|
18 |
BL;BO;BOL;68;Bolivia;108438;9182015;19;5;-64.671;-16.715;; |
|
19 |
BM;MM;MMR;104;Burma;65755;47967266;142;35;96.041;21.718;; |
|
20 |
BN;BJ;BEN;204;Benin;11062;8490301;2;11;2.469;10.541;; |
|
21 |
BP;SB;SLB;90;Solomon Islands;2799;472419;9;54;160.109;-9.611;; |
|
22 |
BR;BR;BRA;76;Brazil;845942;186830759;19;5;-53.089;-10.772;; |
|
23 |
BU;BG;BGR;100;Bulgaria;11063;7744591;150;151;25.231;42.761;; |
|
24 |
BX;BN;BRN;96;Brunei Darussalam;527;373831;142;35;114.591;4.468;; |
|
25 |
CA;CA;CAN;124;Canada;909351;32270507;19;21;-109.433;59.081;; |
|
26 |
CB;KH;KHM;116;Cambodia;17652;13955507;142;35;104.564;12.714;; |
|
27 |
CE;LK;LKA;144;Sri Lanka;6463;19120763;142;34;80.704;7.612;; |
|
28 |
CF;CG;COG;178;Congo;34150;3609851;2;17;15.986;-0.055;; |
|
29 |
CG;CD;COD;180;Democratic Republic of the Congo;226705;58740547;2;17;23.654;-2.876;; |
|
30 |
BY;BI;BDI;108;Burundi;2568;7858791;2;14;29.887;-3.356;; |
|
31 |
CH;CN;CHN;156;China;932743;1312978855;142;30;106.514;33.420;; |
|
32 |
AF;AF;AFG;4;Afghanistan;65209;25067407;142;34;65.216;33.677;; |
|
33 |
BT;BT;BTN;64;Bhutan;4700;637013;142;34;90.429;27.415;; |
|
34 |
CI;CL;CHL;152;Chile;74880;16295102;19;5;-69.433;-23.389;; |
|
35 |
CJ;KY;CYM;136;Cayman Islands;26;45591;19;29;-81.198;19.314;; |
|
36 |
CM;CM;CMR;120;Cameroon;46540;17795149;2;17;12.277;5.133;; |
|
37 |
CD;TD;TCD;148;Chad;125920;10145609;2;17;18.665;15.361;; |
|
38 |
CN;KM;COM;174;Comoros;223;797902;2;14;43.337;-11.758;; |
|
39 |
CO;CO;COL;170;Colombia;103870;4494579;19;5;-73.076;3.900;; |
|
40 |
CS;CR;CRI;188;Costa Rica;5106;4327228;19;13;-83.946;9.971;; |
|
41 |
CT;CF;CAF;140;Central African Republic;62298;4191429;2;17;20.483;6.571;; |
|
42 |
CU;CU;CUB;192;Cuba;10982;11259905;19;29;-77.781;21.297;; |
|
43 |
CV;CV;CPV;132;Cape Verde;403;506807;2;11;-23.634;15.071;; |
|
44 |
CW;CK;COK;184;Cook Islands;24;13984;9;61;-159.782;-21.219;; |
|
45 |
CY;CY;CYP;196;Cyprus;924;836321;142;145;33.219;35.043;; |
|
46 |
DA;DK;DNK;208;Denmark;4243;5416945;150;154;9.264;56.058;; |
|
47 |
DJ;DJ;DJI;262;Djibouti;2318;804206;2;14;42.516;11.900;; |
|
48 |
DO;DM;DMA;212;Dominica;75;67827;19;29;-61.356;15.475;; |
|
49 |
DR;DO;DOM;214;Dominican Republic;4838;9469601;19;29;-70.729;19.015;; |
|
50 |
EC;EC;ECU;218;Ecuador;27684;13060993;19;5;-78.497;-1.385;; |
|
51 |
EG;EG;EGY;818;Egypt;99545;72849793;2;15;29.872;26.494;; |
|
52 |
EI;IE;IRL;372;Ireland;6889;4143294;150;154;-8.152;53.177;; |
|
53 |
EK;GQ;GNQ;226;Equatorial Guinea;2805;484098;2;17;10.488;1.607;; |
|
54 |
EN;EE;EST;233;Estonia;4239;1344312;150;154;25.793;58.674;; |
|
55 |
ER;ER;ERI;232;Eritrea;10100;4526722;2;14;38.219;16.045;; |
|
56 |
ES;SV;SLV;222;El Salvador;2072;6668356;19;13;-88.866;13.736;; |
|
57 |
ET;ET;ETH;231;Ethiopia;100000;78985857;2;14;39.616;8.626;; |
|
58 |
AU;AT;AUT;40;Austria;8245;8291979;150;155;14.912;47.683;; |
|
59 |
EZ;CZ;CZE;203;Czech Republic;7727;10191762;150;151;15.338;49.743;; |
|
60 |
FG;GF;GUF;254;French Guiana;8815;192099;19;5;-53.241;3.924;; |
|
61 |
FI;FI;FIN;246;Finland;30459;5246004;150;154;26.272;64.504;; |
|
62 |
FJ;FJ;FJI;242;Fiji;1827;828046;9;54;177.974;-17.819;; |
|
63 |
FK;FK;FLK;238;Falkland Islands (Malvinas);1217;2975;19;5;-58.694;-51.665;; |
|
64 |
"FM;FM;FSM;583;Micronesia, Federated States of;70;110058;9;57;158.235;6.883;;";;;;;;;;;;;; |
|
65 |
FP;PF;PYF;258;French Polynesia;366;255632;9;61;-149.462;-17.626;; |
|
66 |
FR;FR;FRA;250;France;55010;60990544;150;155;2.550;46.565;; |
|
67 |
GA;GM;GMB;270;Gambia;1000;1617029;2;11;-15.386;13.453;; |
|
68 |
GB;GA;GAB;266;Gabon;25767;1290693;2;17;11.797;-0.591;; |
|
69 |
GG;GE;GEO;268;Georgia;6949;4473409;142;145;43.518;42.176;; |
|
70 |
GH;GH;GHA;288;Ghana;22754;2253501;2;11;-1.207;7.960;; |
|
71 |
GJ;GD;GRD;308;Grenada;34;105237;19;29;-61.678;12.118;; |
|
72 |
GL;GL;GRL;304;Greenland;41045;57475;19;21;-41.391;74.719;; |
|
73 |
GM;DE;DEU;276;Germany;34895;82652369;150;155;9.851;51.110;; |
|
74 |
GQ;GU;GUM;316;Guam;55;16857;9;57;144.707;13.385;; |
|
75 |
GR;GR;GRC;300;Greece;12890;11099737;150;39;21.766;39.666;; |
|
76 |
GT;GT;GTM;320;Guatemala;10843;12709564;19;13;-90.398;15.256;; |
|
77 |
GV;GN;GIN;324;Guinea;24572;9002656;2;11;-10.942;10.439;; |
|
78 |
GY;GY;GUY;328;Guyana;19685;739472;19;5;-58.974;4.792;; |
|
79 |
HA;HT;HTI;332;Haiti;2756;9296291;19;29;-72.278;19.142;; |
|
80 |
HO;HN;HND;340;Honduras;11189;683411;19;13;-86.863;14.819;; |
|
81 |
HR;HR;HRV;191;Croatia;5592;455149;150;39;16.693;45.723;; |
|
82 |
HU;HU;HUN;348;Hungary;9210;10086387;150;151;19.134;47.070;; |
|
83 |
IC;IS;ISL;352;Iceland;10025;295732;150;154;-18.480;64.764;; |
|
84 |
IN;IN;IND;356;India;297319;1134403141;142;34;78.500;21.000;; |
|
85 |
IR;IR;IRN;364;Iran (Islamic Republic of);163620;69420607;142;34;54.301;32.565;; |
|
86 |
IS;IL;ISR;376;Israel;2171;6692037;142;145;34.851;31.026;; |
|
87 |
IT;IT;ITA;380;Italy;29411;5864636;150;39;12.800;42.700;; |
|
88 |
IV;CI;CIV;384;Cote d'Ivoire;31800;18584701;2;11;-5.556;7.632;; |
|
89 |
IZ;IQ;IRQ;368;Iraq;43737;27995984;142;145;43.772;33.048;; |
|
90 |
JA;JP;JPN;392;Japan;36450;127896740;142;30;139.068;36.491;; |
|
91 |
JM;JM;JAM;388;Jamaica;1083;2682469;19;29;-77.320;18.151;; |
|
92 |
JO;JO;JOR;400;Jordan;8824;5544066;142;145;36.319;30.703;; |
|
93 |
KE;KE;KEN;404;Kenya;56914;35598952;2;14;37.858;0.530;; |
|
94 |
KG;KG;KGZ;417;Kyrgyzstan;19180;5203547;142;143;74.555;41.465;; |
|
95 |
"KN;KP;PRK;408;Korea, Democratic People's Republic of;12041;23615611;142;30;126.451;39.778;;";;;;;;;;;;;; |
|
96 |
KR;KI;KIR;296;Kiribati;73;92003;9;57;175.036;-1.508;; |
|
97 |
"KS;KR;KOR;410;Korea, Republic of;9873;47869837;142;30;128.103;36.504;;";;;;;;;;;;;; |
|
98 |
KU;KW;KWT;414;Kuwait;1782;2700;142;145;47.376;29.476;; |
|
99 |
KZ;KZ;KAZ;398;Kazakhstan;269970;15210609;142;143;67.301;48.160;; |
|
100 |
LA;LA;LAO;418;Lao People's Democratic Republic;23080;566391;142;35;102.471;19.905;; |
|
101 |
LE;LB;LBN;422;Lebanon;1023;401074;142;145;35.888;33.920;; |
|
102 |
LG;LV;LVA;428;Latvia;6205;2301793;150;154;25.641;56.858;; |
|
103 |
BO;BY;BLR;112;Belarus;20748;9795287;150;151;28.047;53.540;; |
|
104 |
LH;LT;LTU;440;Lithuania;6268;3425077;150;154;23.897;55.336;; |
|
105 |
LI;LR;LBR;430;Liberia;9632;3441796;2;11;-9.657;6.682;; |
|
106 |
LO;SK;SVK;703;Slovakia;4808;5386995;150;151;19.491;48.707;; |
|
107 |
LS;LI;LIE;438;Liechtenstein;16;34598;150;155;9.555;47.153;; |
|
108 |
LY;LY;LBY;434;Libyan Arab Jamahiriya;175954;5918217;2;15;18.023;27.044;; |
|
109 |
MA;MG;MDG;450;Madagascar;58154;18642586;2;14;46.706;-19.374;; |
|
110 |
MB;MQ;MTQ;474;Martinique;106;395896;19;29;-61.021;14.653;; |
|
111 |
MG;MN;MNG;496;Mongolia;156650;2580704;142;30;102.876;46.056;; |
|
112 |
MH;MS;MSR;500;Montserrat;10;5628;19;29;-62.187;16.736;; |
|
113 |
MK;MK;MKD;807;The former Yugoslav Republic of Macedonia;2543;2033655;150;39;21.698;41.600;; |
|
114 |
ML;ML;MLI;466;Mali;122019;1161109;2;11;-3.524;17.350;; |
|
115 |
MO;MA;MAR;504;Morocco;44630;30494991;2;15;-5.758;32.706;; |
|
116 |
MP;MU;MUS;480;Mauritius;203;1241173;2;14;57.583;-20.255;; |
|
117 |
MR;MR;MRT;478;Mauritania;102522;2963105;2;11;-10.332;20.260;; |
|
118 |
MT;MT;MLT;470;Malta;32;402617;150;39;14.442;35.890;; |
|
119 |
MU;OM;OMN;512;Oman;30950;2507042;142;145;57.407;21.656;; |
|
120 |
MV;MV;MDV;462;Maldives;30;295297;142;34;72.920;3.548;; |
|
121 |
MX;MX;MEX;484;Mexico;190869;104266392;19;13;-102.535;23.951;; |
|
122 |
MY;MY;MYS;458;Malaysia;32855;25652985;142;35;102.195;4.201;; |
|
123 |
MZ;MZ;MOZ;508;Mozambique;78409;20532675;2;14;37.923;-14.422;; |
|
124 |
MI;MW;MWI;454;Malawi;9408;13226091;2;14;33.808;-13.400;; |
|
125 |
NC;NC;NCL;540;New Caledonia;1828;234185;9;54;165.447;-21.359;; |
|
126 |
NE;NU;NIU;570;Niue;26;1632;9;61;-169.869;-19.052;; |
|
127 |
NG;NE;NER;562;Niger;126670;1326419;2;11;9.398;17.426;; |
|
128 |
AA;AW;ABW;533;Aruba;0;102897;19;29;-69.977;12.517;; |
|
129 |
AV;AI;AIA;660;Anguilla;0;12256;19;29;-63.032;18.237;; |
|
130 |
BE;BE;BEL;56;Belgium;0;10398049;150;155;4.664;50.643;; |
|
131 |
HK;HK;HKG;344;Hong Kong;0;7057418;142;30;114.129;22.423;; |
|
132 |
CQ;MP;MNP;580;Northern Mariana Islands;0;80258;9;57;145.623;15.005;; |
|
133 |
FO;FO;FRO;234;Faroe Islands;0;48205;150;154;-6.864;62.050;; |
|
134 |
AN;AD;AND;20;Andorra;0;73483;150;39;1.576;42.549;; |
|
135 |
GI;GI;GIB;292;Gibraltar;0;291;150;39;-5.345;36.138;; |
|
136 |
IM;IM;IMN;833;Isle of Man;0;78357;150;154;-4.527;54.229;; |
|
137 |
LU;LU;LUX;442;Luxembourg;0;456613;150;155;6.088;49.771;; |
|
138 |
MC;MO;MAC;446;Macau;0;47309;142;30;113.545;22.200;; |
|
139 |
MN;MC;MCO;492;Monaco;0;325;150;155;7.412;43.750;; |
|
140 |
;PS;PSE;275;Palestine;0;3762005;142;145;35.278;32.037;; |
|
141 |
MJ;ME;MNE;499;Montenegro;0;607969;150;39;19.254;42.792;; |
|
142 |
MF;YT;MYT;175;Mayotte;0;0;2;14;45.155;-12.777;; |
|
143 |
;AX;ALA;248;Ã…land Islands;0;0;150;154;19.952;60.198;; |
|
144 |
NF;NF;NFK;574;Norfolk Island;0;0;9;53;167.953;-29.037;; |
|
145 |
CK;CC;CCK;166;Cocos (Keeling) Islands;1;0;0;0;96.839;-12.173;; |
|
146 |
AY;AQ;ATA;10;Antarctica;0;0;0;0;21.304;-80.446;; |
|
147 |
BV;BV;BVT;74;Bouvet Island;0;0;0;0;3.412;-54.422;; |
|
148 |
FS;TF;ATF;260;French Southern and Antarctic Lands;0;0;0;0;69.117;-49.302;; |
|
149 |
HM;HM;HMD;334;Heard Island and McDonald Islands;0;0;0;0;73.507;-53.111;; |
|
150 |
IO;IO;IOT;86;British Indian Ocean Territory;0;0;0;0;72.416;-7.335;; |
|
151 |
KT;CX;CXR;162;Christmas Island;0;0;0;0;105.704;-10.444;; |
|
152 |
;UM;UMI;581;United States Minor Outlying Islands;0;0;0;0;-160.027;-0.385;; |
|
153 |
NH;VU;VUT;548;Vanuatu;1219;215366;9;54;166.899;-15.376;; |
|
154 |
NI;NG;NGA;566;Nigeria;91077;141356083;2;11;8.105;9.594;; |
|
155 |
NL;NL;NLD;528;Netherlands;3388;1632769;150;155;5.389;52.077;; |
|
156 |
NO;NO;NOR;578;Norway;30625;4638836;150;154;8.740;61.152;; |
|
157 |
NP;NP;NPL;524;Nepal;14300;27093656;142;34;83.939;28.253;; |
|
158 |
NR;NR;NRU;520;Nauru;2;10111;9;57;166.930;-0.522;; |
|
159 |
NS;SR;SUR;740;Suriname;15600;452468;19;5;-55.912;4.127;; |
|
160 |
NU;NI;NIC;558;Nicaragua;12140;5462539;19;13;-85.034;12.840;; |
|
161 |
NZ;NZ;NZL;554;New Zealand;26799;4097112;9;53;172.235;-42.634;; |
|
162 |
PA;PY;PRY;600;Paraguay;39730;5904342;19;5;-58.391;-23.236;; |
|
163 |
PE;PE;PER;604;Peru;128000;27274266;19;5;-75.552;-9.326;; |
|
164 |
PK;PK;PAK;586;Pakistan;77088;158080591;142;34;69.386;29.967;; |
|
165 |
PL;PL;POL;616;Poland;30629;38195558;150;151;19.401;52.125;; |
|
166 |
PM;PA;PAN;591;Panama;7443;3231502;19;13;-80.920;8.384;; |
|
167 |
PO;PT;PRT;620;Portugal;9150;10528226;150;39;-8.058;40.309;; |
|
168 |
PP;PG;PNG;598;Papua New Guinea;45286;6069715;9;54;143.459;-5.949;; |
|
169 |
PU;GW;GNB;624;Guinea-Bissau;2812;1596929;2;11;-14.651;12.125;; |
|
170 |
QA;QA;QAT;634;Qatar;1100;796186;142;145;51.191;25.316;; |
|
171 |
RE;RE;REU;638;Reunion;250;785159;2;14;55.538;-21.122;; |
|
172 |
RO;RO;ROU;642;Romania;22987;21627557;150;151;24.969;45.844;; |
|
173 |
MD;MD;MDA;498;Republic of Moldova;3288;3876661;150;151;28.599;47.193;; |
|
174 |
RP;PH;PHL;608;Philippines;29817;84566163;142;35;122.466;11.118;; |
|
175 |
RQ;PR;PRI;630;Puerto Rico;887;3946779;19;29;-66.466;18.221;; |
|
176 |
RS;RU;RUS;643;Russia;1638094;143953092;150;151;96.689;61.988;; |
|
177 |
RW;RW;RWA;646;Rwanda;2467;9233793;2;14;29.917;-1.998;; |
|
178 |
SA;SA;SAU;682;Saudi Arabia;214969;2361236;142;145;44.585;24.023;; |
|
179 |
SC;KN;KNA;659;Saint Kitts and Nevis;36;49138;19;29;-62.769;17.340;; |
|
180 |
SE;SC;SYC;690;Seychelles;46;85532;2;14;55.474;-4.647;; |
|
181 |
SF;ZA;ZAF;710;South Africa;121447;47938663;2;18;23.121;-30.558;; |
|
182 |
LT;LS;LSO;426;Lesotho;3035;1980831;2;18;28.243;-29.581;; |
|
183 |
BC;BW;BWA;72;Botswana;56673;1835938;2;18;23.815;-22.182;; |
|
184 |
SG;SN;SEN;686;Senegal;19253;1177034;2;11;-14.881;15.013;; |
|
185 |
SI;SI;SVN;705;Slovenia;2014;1999425;150;39;14.827;46.124;; |
|
186 |
SL;SL;SLE;694;Sierra Leone;7162;5586403;2;11;-11.792;8.560;; |
|
187 |
SN;SG;SGP;702;Singapore;67;4327468;142;35;103.808;1.351;; |
|
188 |
SO;SO;SOM;706;Somalia;62734;8196395;2;14;48.316;9.774;; |
|
189 |
SP;ES;ESP;724;Spain;49904;43397491;150;39;-3.649;40.227;; |
|
190 |
ST;LC;LCA;662;Saint Lucia;61;16124;19;29;-60.969;13.898;; |
|
191 |
SU;SD;SDN;736;Sudan;237600;36899747;2;15;30.050;13.832;; |
|
192 |
SW;SE;SWE;752;Sweden;41033;9038049;150;154;15.270;62.011;; |
|
193 |
SY;SY;SYR;760;Syrian Arab Republic;18378;18893881;142;145;38.506;35.013;; |
|
194 |
SZ;CH;CHE;756;Switzerland;4000;7424389;150;155;7.908;46.861;; |
|
195 |
TD;TT;TTO;780;Trinidad and Tobago;513;1323722;19;29;-61.253;10.468;; |
|
196 |
TH;TH;THA;764;Thailand;51089;63002911;142;35;100.844;15.700;; |
|
197 |
TI;TJ;TJK;762;Tajikistan;13996;6550213;142;143;69.420;38.665;; |
|
198 |
TL;TK;TKL;772;Tokelau;1;1401;9;61;-171.853;-9.193;; |
|
199 |
TN;TO;TON;776;Tonga;72;99361;9;61;-175.185;-21.202;; |
|
200 |
TO;TG;TGO;768;Togo;5439;6238572;2;11;1.081;8.799;; |
|
201 |
TP;ST;STP;678;Sao Tome and Principe;96;152622;2;17;6.629;0.201;; |
|
202 |
TS;TN;TUN;788;Tunisia;15536;10104685;2;15;9.596;35.383;; |
|
203 |
TU;TR;TUR;792;Turkey;76963;72969723;142;145;35.179;39.061;; |
|
204 |
TV;TV;TUV;798;Tuvalu;3;10441;9;61;179.219;-8.514;; |
|
205 |
TX;TM;TKM;795;Turkmenistan;46993;4833266;142;143;59.384;39.122;; |
|
206 |
TZ;TZ;TZA;834;United Republic of Tanzania;88359;38477873;2;14;34.823;-6.270;; |
|
207 |
UG;UG;UGA;800;Uganda;19710;28947181;2;14;32.386;1.280;; |
|
208 |
UK;GB;GBR;826;United Kingdom;24193;60244834;150;154;-1.600;53.000;; |
|
209 |
UP;UA;UKR;804;Ukraine;57935;46917544;150;151;31.388;49.016;; |
|
210 |
US;US;USA;840;United States;915896;299846449;19;21;-98.606;39.622;; |
|
211 |
UV;BF;BFA;854;Burkina Faso;27360;13933363;2;11;-1.740;12.278;; |
|
212 |
UY;UY;URY;858;Uruguay;17502;3325727;19;5;-56.012;-32.800;; |
|
213 |
UZ;UZ;UZB;860;Uzbekistan;42540;26593123;142;143;63.170;41.750;; |
|
214 |
VC;VC;VCT;670;Saint Vincent and the Grenadines;39;119137;19;29;-61.194;13.248;; |
|
215 |
VE;VE;VEN;862;Venezuela;88205;26725573;19;5;-66.166;7.125;; |
|
216 |
VI;VG;VGB;92;British Virgin Islands;15;22016;19;29;-64.390;18.483;; |
|
217 |
VM;VN;VNM;704;Viet Nam;32549;85028643;142;35;105.314;21.491;; |
|
218 |
VQ;VI;VIR;850;United States Virgin Islands;35;111408;19;29;-64.785;17.741;; |
|
219 |
WA;NA;NAM;516;Namibia;82329;2019677;2;18;17.218;-22.133;; |
|
220 |
WF;WF;WLF;876;Wallis and Futuna Islands;14;15079;9;61;-178.131;-14.289;; |
|
221 |
WS;WS;WSM;882;Samoa;283;183845;9;61;-172.414;-13.652;; |
|
222 |
WZ;SZ;SWZ;748;Swaziland;1720;1124529;2;18;31.497;-26.562;; |
|
223 |
YM;YE;YEM;887;Yemen;52797;21095679;142;145;48.355;15.807;; |
|
224 |
ZA;ZM;ZMB;894;Zambia;74339;11478317;2;14;26.320;-14.614;; |
|
225 |
ZI;ZW;ZWE;716;Zimbabwe;38685;13119679;2;14;29.872;-19.000;; |
|
226 |
ID;ID;IDN;360;Indonesia;181157;226063044;142;35;114.252;-0.976;; |
|
227 |
GP;GP;GLP;312;Guadeloupe;169;438403;19;29;-61.441;16.286;; |
|
228 |
NT;AN;ANT;530;Netherlands Antilles;80;186392;19;29;-68.870;12.123;; |
|
229 |
AE;AE;ARE;784;United Arab Emirates;8360;4104291;142;145;54.163;23.549;; |
|
230 |
TT;TL;TLS;626;Timor-Leste;1487;1067285;142;35;125.878;-8.822;; |
|
231 |
PC;PN;PCN;612;Pitcairn Islands;0;5;9;61;-128.316;-24.366;; |
|
232 |
PS;PW;PLW;585;Palau;0;20127;9;57;134.570;7.501;; |
|
233 |
RM;MH;MHL;584;Marshall Islands;0;5672;9;57;168.963;7.595;; |
|
234 |
SB;PM;SPM;666;Saint Pierre and Miquelon;0;6346;19;21;-56.325;47.042;; |
|
235 |
SH;SH;SHN;654;Saint Helena;0;6399;2;11;-5.710;-15.953;; |
|
236 |
SM;SM;SMR;674;San Marino;0;30214;150;39;12.460;43.942;; |
|
237 |
TK;TC;TCA;796;Turks and Caicos Islands;0;24459;19;29;-71.950;21.902;; |
|
238 |
WI;EH;ESH;732;Western Sahara;0;440428;2;15;-13.706;24.554;; |
|
239 |
RB;RS;SRB;688;Serbia;0;9863026;150;39;20.806;44.032;; |
|
240 |
VT;VA;VAT;336;Holy See (Vatican City);0;783;150;39;12.451;41.904;; |
|
241 |
SV;SJ;SJM;744;Svalbard;0;0;150;154;18.374;78.830;; |
|
242 |
RN;MF;MAF;663;Saint Martin;0;0;19;29;-63.041;18.094;; |
|
243 |
TB;BL;BLM;652;Saint Barthelemy;0;0;19;29;-63.043;18.040;; |
|
244 |
GK;GG;GGY;831;Guernsey;0;0;150;154;-2.576;49.459;; |
|
245 |
JE;JE;JEY;832;Jersey;0;0;150;154;-2.129;49.219;; |
|
246 |
SX;GS;SGS;239;South Georgia South Sandwich Islands;0;0;0;0;-36.891;-54.209;; |
|
247 |
TW;TW;TWN;158;Taiwan;0;0;0;0;120.946;23.754;; |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/java/org/gvsig/sqlite/dal/TestCreate.java | ||
---|---|---|
5 | 5 |
import java.util.List; |
6 | 6 |
import junit.framework.TestCase; |
7 | 7 |
import static junit.framework.TestCase.assertEquals; |
8 |
import org.apache.commons.lang3.StringUtils; |
|
8 | 9 |
import org.gvsig.expressionevaluator.ExpressionBuilder; |
9 | 10 |
import org.gvsig.expressionevaluator.ExpressionUtils; |
10 | 11 |
import org.gvsig.fmap.dal.DALLocator; |
12 |
import org.gvsig.fmap.dal.DataManager; |
|
11 | 13 |
import org.gvsig.fmap.dal.DataTypes; |
12 |
import org.gvsig.fmap.dal.DataManager; |
|
13 |
import org.gvsig.fmap.dal.DataStore; |
|
14 | 14 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
15 | 15 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
16 | 16 |
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; |
... | ... | |
60 | 60 |
return "testCreateTarget1"; |
61 | 61 |
} |
62 | 62 |
|
63 |
protected FeatureStore openTargetStore1(JDBCServerExplorer explorer) throws Exception { |
|
64 |
JDBCStoreParameters params = explorer.get(getTargetName()); |
|
63 |
protected FeatureStore openTargetStore1(JDBCServerExplorer explorer, String targetName) throws Exception { |
|
64 |
JDBCStoreParameters params; |
|
65 |
if(StringUtils.isBlank(targetName)) { |
|
66 |
params = explorer.get(getTargetName()); |
|
67 |
} else { |
|
68 |
params = explorer.get(targetName); |
|
69 |
} |
|
65 | 70 |
|
66 | 71 |
DataManager dataManager = DALLocator.getDataManager(); |
67 | 72 |
FeatureStore store; |
... | ... | |
77 | 82 |
return store; |
78 | 83 |
} |
79 | 84 |
|
85 |
protected FeatureStore openTargetStore1(JDBCServerExplorer explorer) throws Exception { |
|
86 |
return openTargetStore1(explorer, getTargetName()); |
|
87 |
} |
|
88 |
|
|
80 | 89 |
protected void createFrom(JDBCServerExplorer explorer, FeatureStore sourceStore) throws Exception { |
90 |
createFrom(explorer, sourceStore, getTargetName()); |
|
91 |
} |
|
92 |
|
|
93 |
protected void createFrom(JDBCServerExplorer explorer, FeatureStore sourceStore, String targetName) throws Exception { |
|
81 | 94 |
NewFeatureStoreParameters params = (NewFeatureStoreParameters) explorer.getAddParameters( |
82 |
getTargetName()
|
|
95 |
targetName
|
|
83 | 96 |
); |
84 | 97 |
EditableFeatureType ft = params.getDefaultFeatureType(); |
85 | 98 |
ft.addAll(sourceStore.getDefaultFeatureType()); |
... | ... | |
180 | 193 |
} |
181 | 194 |
|
182 | 195 |
protected void copyFrom(JDBCServerExplorer explorer, FeatureStore sourceStore, int mode) throws Exception { |
183 |
FeatureStore targetStore = openTargetStore1(explorer); |
|
196 |
copyFrom(explorer, sourceStore, mode, getTargetName()); |
|
197 |
} |
|
198 |
|
|
199 |
protected void copyFrom(JDBCServerExplorer explorer, FeatureStore sourceStore, int mode, String targetName) throws Exception { |
|
200 |
FeatureStore targetStore = openTargetStore1(explorer, targetName); |
|
184 | 201 |
targetStore.edit(mode); |
185 | 202 |
try { |
186 | 203 |
for (Feature sourceFeature : sourceStore.getFeatureSet()) { |
... | ... | |
280 | 297 |
} |
281 | 298 |
} |
282 | 299 |
|
300 |
public void testCreatePopulate() throws Exception { |
|
301 |
// FIXME: probablemente habria que empezar por este test para adaptar |
|
302 |
// los test a SQLite. Este test a?ade la tabla countries adem?s de la |
|
303 |
// de por defecto para los test |
|
304 |
try { |
|
305 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
|
306 |
JDBCServerExplorer explorer = TestUtils.openServerExplorer(DBNAME); |
|
307 |
createFrom(explorer, sourceStore); |
|
308 |
copyFrom(explorer, sourceStore, FeatureStore.MODE_APPEND); |
|
309 |
|
|
310 |
|
|
311 |
FeatureStore countriesStore = TestUtils.openCountriesStore(); |
|
312 |
createFrom(explorer, countriesStore, "countries"); |
|
313 |
copyFrom(explorer, countriesStore, FeatureStore.MODE_APPEND, "countries"); |
|
314 |
|
|
315 |
} catch(Throwable t) { |
|
316 |
LOGGER.warn("",t); |
|
317 |
throw t; |
|
318 |
} |
|
319 |
} |
|
320 |
|
|
283 | 321 |
public void testFilterByDate() throws Exception { |
284 | 322 |
try { |
285 | 323 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/java/org/gvsig/sqlite/dal/operations/sql/TestUpdateTableStatistics.java | ||
---|---|---|
58 | 58 |
|
59 | 59 |
List<String> SQLs = updateTableStatistics.getSQLs(); |
60 | 60 |
assertEquals("UpdateTableStatistics num. SQLs", expectedSQLs.size(), SQLs.size()); |
61 |
for (int i = 0; i < expectedSQLs.size(); i++) { |
|
62 |
assertEquals("UpdateTableStatistics SQL "+i, expectedSQLs.get(i), SQLs.get(i)); |
|
61 |
for (int i = 0; i < expectedSQLs.size(); i++) { |
|
62 |
System.out.println("###### SQL:" + SQLs.get(i)); |
|
63 |
System.out.println("###### EXP:" + expectedSQLs.get(i)); |
|
64 |
|
|
65 |
assertEquals("UpdateTableStatistics SQL " + i, expectedSQLs.get(i), SQLs.get(i)); |
|
63 | 66 |
} |
64 | 67 |
} |
65 | 68 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/java/org/gvsig/sqlite/dal/operations/sql/TestFetchFeatureType.java | ||
---|---|---|
62 | 62 |
); |
63 | 63 |
|
64 | 64 |
String retrieveMetadataOfTableSQL = fetchFeatureType.getSQLToRetrieveMetadataOfTable(); |
65 |
System.out.println("###### FetchFeatureType retrieve metadata SQL:" + retrieveMetadataOfTableSQL); |
|
66 |
|
|
65 | 67 |
String retrievePrimaryKeysFromInformationSchemaSQL = fetchFeatureType.getSQLToRetrievePrimaryKeysFromInformationSchema(); |
66 |
System.out.println("###### FetchFeatureType retrieve metadata SQL:" + retrieveMetadataOfTableSQL); |
|
67 | 68 |
System.out.println("###### FetchFeatureType primery keys SQL:" + retrievePrimaryKeysFromInformationSchemaSQL); |
68 | 69 |
|
69 | 70 |
assertEquals("FetchFeatureType SQL to retrieve metadata", expectedSQLs.get(0), retrieveMetadataOfTableSQL); |
70 |
assertEquals("FetchFeatureType get primery keys SQL", expectedSQLs.get(1), retrievePrimaryKeysFromInformationSchemaSQL);
|
|
71 |
assertNull("FetchFeatureType get primery keys SQL", retrievePrimaryKeysFromInformationSchemaSQL);
|
|
71 | 72 |
} |
72 | 73 |
|
73 | 74 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/java/org/gvsig/sqlite/dal/operations/sql/TestResultSetForSetProvider.java | ||
---|---|---|
558 | 558 |
); |
559 | 559 |
StringBuilder filter = new StringBuilder(); |
560 | 560 |
filter.append("EXISTS("); |
561 |
filter.append(" SELECT \"ISO_A2\" FROM countries");
|
|
561 |
filter.append(" SELECT \"ISO2\" FROM countries"); |
|
562 | 562 |
filter.append(" WHERE "); |
563 | 563 |
filter.append(" test.STRING = countries.CONTINENT AND "); |
564 | 564 |
filter.append(" countries.LASTCENSUS < 0 "); |
... | ... | |
656 | 656 |
); |
657 | 657 |
StringBuilder filter = new StringBuilder(); |
658 | 658 |
filter.append("EXISTS("); |
659 |
filter.append(" SELECT \"ISO_A2\" FROM countries");
|
|
659 |
filter.append(" SELECT \"ISO2\" FROM countries"); |
|
660 | 660 |
filter.append(" WHERE "); |
661 | 661 |
filter.append(" test.STRING = countries.CONTINENT AND "); |
662 | 662 |
filter.append(" countries.LASTCENSUS < 0 "); |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/java/org/gvsig/sqlite/dal/operations/sql/TestCreateTable.java | ||
---|---|---|
6 | 6 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
7 | 7 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
8 | 8 |
import org.gvsig.fmap.dal.feature.FeatureType; |
9 |
import org.gvsig.fmap.dal.store.jdbc2.AbstractTestUtils; |
|
10 |
import org.gvsig.fmap.dal.store.jdbc2.AbstractTestUtils.Expecteds; |
|
9 | 11 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper; |
10 | 12 |
import org.gvsig.fmap.dal.store.jdbc2.OperationsFactory; |
11 | 13 |
import org.gvsig.fmap.dal.store.jdbc2.OperationsFactory.TableReference; |
12 | 14 |
import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCSQLBuilderBase; |
13 | 15 |
import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation; |
14 | 16 |
import org.gvsig.sqlite.dal.TestUtils; |
17 |
import org.gvsig.sqlite.dal.TestUtilsSQLite; |
|
15 | 18 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
16 | 19 |
import org.slf4j.Logger; |
17 | 20 |
import org.slf4j.LoggerFactory; |
... | ... | |
44 | 47 |
JDBCSQLBuilderBase sqlbuilder = helper.createSQLBuilder(); |
45 | 48 |
OperationsFactory operations = helper.getOperations(); |
46 | 49 |
|
47 |
List<String> expectedSQLs = TestUtils.getSQLs("createTable.sql"); |
|
50 |
TestUtilsSQLite utils = new TestUtilsSQLite(); |
|
51 |
Expecteds expecteds = utils.getExpecteds("createTable.sql"); |
|
52 |
|
|
53 |
List<String> expectedSQLs = expecteds.getAll("createTable"); |
|
48 | 54 |
|
49 | 55 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
50 | 56 |
|
... | ... | |
62 | 68 |
null |
63 | 69 |
); |
64 | 70 |
List<String> SQLs = createTable.getSQLs(); |
65 |
for (int i = 0; i < SQLs.size(); i++) { |
|
66 |
System.out.println("###### testCreateTable"); |
|
67 |
System.out.println("###### SQL:" + SQLs.get(i) + ";"); |
|
68 |
} |
|
71 |
// for (int i = 0; i < SQLs.size(); i++) {
|
|
72 |
// System.out.println("###### testCreateTable");
|
|
73 |
// System.out.println("###### SQL:" + SQLs.get(i) + ";");
|
|
74 |
// }
|
|
69 | 75 |
|
70 | 76 |
assertEquals("CreateTable num. SQLs", expectedSQLs.size(), SQLs.size()); |
71 |
for (int i = 0; i < expectedSQLs.size(); i++) { |
|
72 |
System.out.println("###### testCreateTable"); |
|
73 |
System.out.println("###### SQL:" + SQLs.get(i) + ";"); |
|
74 |
System.out.println("###### EXP:" + expectedSQLs.get(i) + ";"); |
|
75 |
|
|
76 |
assertEquals("CreateTable SQL "+i, expectedSQLs.get(i), SQLs.get(i)); |
|
77 |
} |
|
77 |
for (int i = 0; i < expectedSQLs.size(); i++) { |
|
78 |
System.out.println("###### SQL" + i + ":" + SQLs.get(i) + ";"); |
|
79 |
System.out.println("###### EXP" + i + ":" + expectedSQLs.get(i) + ";"); |
|
80 |
if (i != 3) { |
|
81 |
assertEquals("CreateTable SQL " + i, expectedSQLs.get(i), SQLs.get(i)); |
|
82 |
} else { |
|
83 |
assertTrue(expecteds.match("createTable", i, SQLs.get(i))); |
|
84 |
} |
|
85 |
} |
|
78 | 86 |
} catch(Exception ex) { |
79 | 87 |
LOGGER.warn("Error",ex); |
80 | 88 |
throw ex; |
... | ... | |
87 | 95 |
JDBCSQLBuilderBase sqlbuilder = helper.createSQLBuilder(); |
88 | 96 |
OperationsFactory operations = helper.getOperations(); |
89 | 97 |
|
90 |
List<String> expectedSQLs = TestUtils.getSQLs("createTable.sql"); |
|
98 |
TestUtilsSQLite utils = new TestUtilsSQLite(); |
|
99 |
Expecteds expecteds = utils.getExpecteds("createTable.sql"); |
|
91 | 100 |
|
101 |
List<String> expectedSQLs = expecteds.getAll("createTable"); |
|
102 |
|
|
92 | 103 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
93 | 104 |
|
94 | 105 |
TableReference table = operations.createTableReference( |
... | ... | |
108 | 119 |
null |
109 | 120 |
); |
110 | 121 |
List<String> SQLs = createTable.getSQLs(); |
111 |
for (int i = 0; i < SQLs.size(); i++) { |
|
112 |
System.out.println("###### testCreateTable"); |
|
113 |
System.out.println("###### SQL:" + SQLs.get(i) + ";"); |
|
114 |
} |
|
115 |
|
|
116 | 122 |
assertEquals("CreateTable num. SQLs", expectedSQLs.size(), SQLs.size()); |
117 | 123 |
for (int i = 0; i < expectedSQLs.size(); i++) { |
118 |
assertEquals("CreateTable SQL "+i, expectedSQLs.get(i), SQLs.get(i)); |
|
124 |
System.out.println("###### SQL" + i + ":" + SQLs.get(i) + ";"); |
|
125 |
System.out.println("###### EXP" + i + ":" + expectedSQLs.get(i) + ";"); |
|
126 |
if (i != 3) { |
|
127 |
assertEquals("CreateTable SQL "+i, expectedSQLs.get(i), SQLs.get(i)); |
|
128 |
} else { |
|
129 |
assertTrue(expecteds.match("createTable", i, SQLs.get(i))); |
|
130 |
} |
|
131 |
|
|
119 | 132 |
} |
120 | 133 |
} catch(Exception ex) { |
121 | 134 |
LOGGER.warn("Error",ex); |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/java/org/gvsig/sqlite/dal/operations/sql/TestDropTable.java | ||
---|---|---|
1 | 1 |
package org.gvsig.sqlite.dal.operations.sql; |
2 | 2 |
|
3 |
import java.util.ArrayList; |
|
3 | 4 |
import java.util.List; |
4 | 5 |
import junit.framework.TestCase; |
5 | 6 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
... | ... | |
9 | 10 |
import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCSQLBuilderBase; |
10 | 11 |
import org.gvsig.fmap.dal.store.jdbc2.spi.operations.DropTableOperation; |
11 | 12 |
import org.gvsig.sqlite.dal.TestUtils; |
13 |
import org.gvsig.sqlite.dal.geopackage.index.GeopackageIndexRTree; |
|
12 | 14 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
13 | 15 |
import org.slf4j.Logger; |
14 | 16 |
import org.slf4j.LoggerFactory; |
... | ... | |
35 | 37 |
// TODO add test methods here. The name must begin with 'test'. For example: |
36 | 38 |
// public void testHello() {} |
37 | 39 |
|
38 |
public void testDropTable() throws Exception { |
|
39 |
JDBCHelper helper = TestUtils.createJDBCHelper(); |
|
40 |
JDBCSQLBuilderBase sqlbuilder = helper.createSQLBuilder(); |
|
41 |
OperationsFactory operations = helper.getOperations(); |
|
40 |
public void testDropTable() throws Exception {
|
|
41 |
JDBCHelper helper = TestUtils.createJDBCHelper();
|
|
42 |
JDBCSQLBuilderBase sqlbuilder = helper.createSQLBuilder();
|
|
43 |
OperationsFactory operations = helper.getOperations();
|
|
42 | 44 |
|
43 |
List<String> expectedSQLs = TestUtils.getSQLs("dropTable.sql"); |
|
44 |
|
|
45 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
|
45 |
List<String> expectedSQLs = TestUtils.getSQLs("dropTable.sql"); |
|
46 | 46 |
|
47 |
TableReference table = operations.createTableReference( |
|
48 |
"dbtest", |
|
49 |
sqlbuilder.default_schema(), |
|
50 |
"test", |
|
51 |
null |
|
52 |
); |
|
53 |
DropTableOperation dropTable = operations.createDropTable( |
|
54 |
table |
|
55 |
); |
|
56 |
List<String> SQLs = dropTable.getSQLs(); |
|
57 |
for (int i = 0; i < SQLs.size(); i++) { |
|
47 |
FeatureStore sourceStore = TestUtils.openSourceStore1(); |
|
48 |
|
|
49 |
TableReference table = operations.createTableReference( |
|
50 |
"dbtest", |
|
51 |
sqlbuilder.default_schema(), |
|
52 |
"test", |
|
53 |
null |
|
54 |
); |
|
55 |
DropTableOperation dropTable = operations.createDropTable( |
|
56 |
table |
|
57 |
); |
|
58 |
List<String> SQLs = new ArrayList<>(); |
|
59 |
GeopackageIndexRTree index = new GeopackageIndexRTree(); |
|
60 |
SQLs.addAll(index.getRemoveIndexSQL("test", "Geometry")); |
|
61 |
SQLs.addAll(dropTable.getSQLs()); |
|
62 |
|
|
58 | 63 |
System.out.println("###### testDropTable"); |
59 |
System.out.println("###### SQL:" + SQLs.get(i) + ";"); |
|
60 |
} |
|
64 |
for (int i = 0; i < SQLs.size(); i++) { |
|
65 |
System.out.println("###### EXP:" + expectedSQLs.get(i) + ";"); |
|
66 |
System.out.println("###### SQL:" + SQLs.get(i) + ";"); |
|
67 |
} |
|
61 | 68 |
|
62 |
assertEquals("DropTable num. SQLs", expectedSQLs.size(), SQLs.size()); |
|
63 |
for (int i = 0; i < expectedSQLs.size(); i++) { |
|
64 |
assertEquals("DropTable SQL "+i, expectedSQLs.get(i), SQLs.get(i)); |
|
69 |
assertEquals("DropTable num. SQLs", expectedSQLs.size(), SQLs.size()); |
|
70 |
for (int i = 0; i < expectedSQLs.size(); i++) { |
|
71 |
assertEquals("DropTable SQL " + i, expectedSQLs.get(i), SQLs.get(i)); |
|
72 |
} |
|
73 |
|
|
65 | 74 |
} |
66 |
} |
|
67 | 75 |
|
68 | 76 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/java/org/gvsig/sqlite/dal/operations/sql/TestTableIsEmpty.java | ||
---|---|---|
60 | 60 |
); |
61 | 61 |
|
62 | 62 |
String sql = tableIsEmpty.getSQL(); |
63 |
System.out.println("###### SQL:"+sql); |
|
64 |
System.out.println("###### EXP:"+expectedSQLs.get(0)); |
|
65 |
|
|
63 | 66 |
assertEquals("TableIsEmpty SQL", expectedSQLs.get(0), sql); |
64 | 67 |
} |
65 | 68 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/java/org/gvsig/sqlite/dal/RunSQL.java | ||
---|---|---|
7 | 7 |
import java.sql.SQLException; |
8 | 8 |
import java.sql.Statement; |
9 | 9 |
import java.util.ArrayList; |
10 |
import java.util.Collections; |
|
10 | 11 |
import java.util.List; |
11 | 12 |
import java.util.Objects; |
12 | 13 |
import org.apache.commons.io.FilenameUtils; |
... | ... | |
37 | 38 |
public static void main(String[] args) throws Exception { |
38 | 39 |
new DefaultLibrariesInitializer().fullInitialize(); |
39 | 40 |
|
41 |
List<String> sqls = new ArrayList<>(); |
|
42 |
String sql; |
|
43 |
|
|
40 | 44 |
//Modificar estas tres l?neas para cada test |
41 | 45 |
//Test date |
42 | 46 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\" FROM \"test\" WHERE (((\"test\".\"Time\" > ('01:02:03')) AND (\"test\".\"Time\" < ('20:52:55'))) OR ((\"test\".\"Date\" > ('2019-08-01')) AND (\"test\".\"Date\" < ('2020-02-23')))) ORDER BY \"test\".\"ID\" ASC"; |
... | ... | |
53 | 57 |
//FetchFeatureType first row SQL |
54 | 58 |
// String sql = "SELECT * FROM \"test\" LIMIT 0"; |
55 | 59 |
|
56 |
//Test fetch feature type (CHUNGO REVISAR) |
|
57 |
// String sql = "SELECT \n" + |
|
58 |
// " \"COLUMN_NAME\", \"CONSTRAINT_TYPE\" \n" + |
|
59 |
// "FROM INFORMATION_SCHEMA.table_constraints t_cons inner join INFORMATION_SCHEMA.key_column_usage c on c.constraint_catalog = t_cons.constraint_catalog and c.table_schema = t_cons.table_schema and c.table_name = t_cons.table_name and c.constraint_name = t_cons.constraint_name \n" + |
|
60 |
// "WHERE (( (c.TABLE_NAME) LIKE ('test') ) AND ( (\"CONSTRAINT_TYPE\") = ('PRIMARY KEY') ))"; |
|
61 | 60 |
|
61 |
//Test Subselect |
|
62 |
// String sql = "SELECT \"test\".\"ID\",\n" + |
|
63 |
//" \"test\".\"Byte\",\n" + |
|
64 |
//" \"test\".\"Bool1\",\n" + |
|
65 |
//" \"test\".\"Long\",\n" + |
|
66 |
//" \"test\".\"Timestamp\",\n" + |
|
67 |
//" \"test\".\"Date\",\n" + |
|
68 |
//" \"test\".\"Time\",\n" + |
|
69 |
//" \"test\".\"Bool2\",\n" + |
|
70 |
//" \"test\".\"String\",\n" + |
|
71 |
//" \"test\".\"Bool3\",\n" + |
|
72 |
//" \"test\".\"Double\",\n" + |
|
73 |
//" \"test\".\"Bool4\",\n" + |
|
74 |
//" \"test\".\"Float\",\n" + |
|
75 |
//" \"test\".\"Bool5\",\n" + |
|
76 |
//" \"test\".\"Decimal\",\n" + |
|
77 |
//" \"test\".\"Geometry\",\n" + |
|
78 |
//" EXISTS( SELECT \"countries\".\"ISO2\" \n" + |
|
79 |
//" FROM \"countries\" \n" + |
|
80 |
//" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 ) AS \"EXISTS62a964cd7bc24f409b97c03b9170408d\" \n" + |
|
81 |
//"FROM \"test\" \n" + |
|
82 |
//"WHERE EXISTS( SELECT \"countries\".\"ISO2\" \n" + |
|
83 |
//" FROM \"countries\" \n" + |
|
84 |
//" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 ) \n" + |
|
85 |
//"ORDER BY \"test\".\"ID\" ASC"; |
|
62 | 86 |
|
63 |
//Test Subselect (CHUNGO REVISAR) |
|
64 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", " |
|
65 |
// + "\"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", " |
|
66 |
// + "\"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", " |
|
67 |
// + "\"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", " |
|
68 |
// + "EXISTS(( SELECT \"countries\".\"ISO_A2\" " |
|
69 |
// + "FROM \"countries\" " |
|
70 |
// + "WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) AS \"EXISTS62a964cd7bc24f409b97c03b9170408d\" " |
|
71 |
// + "FROM \"test\" " |
|
72 |
// + "WHERE EXISTS(( SELECT \"countries\".\"ISO_A2\" " |
|
73 |
// + "FROM \"countries\" " |
|
74 |
// + "WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) " |
|
75 |
// + "ORDER BY \"test\".\"ID\" ASC"; |
|
87 |
//Test Subselect2 |
|
88 |
// String sql = "SELECT \"test\".\"ID\",\n" + |
|
89 |
//" \"test\".\"Byte\",\n" + |
|
90 |
//" \"test\".\"Bool1\",\n" + |
|
91 |
//" \"test\".\"Long\",\n" + |
|
92 |
//" \"test\".\"Timestamp\",\n" + |
|
93 |
//" \"test\".\"Date\",\n" + |
|
94 |
//" \"test\".\"Time\",\n" + |
|
95 |
//" \"test\".\"Bool2\",\n" + |
|
96 |
//" \"test\".\"String\",\n" + |
|
97 |
//" \"test\".\"Bool3\",\n" + |
|
98 |
//" \"test\".\"Double\",\n" + |
|
99 |
//" \"test\".\"Bool4\",\n" + |
|
100 |
//" \"test\".\"Float\",\n" + |
|
101 |
//" \"test\".\"Bool5\",\n" + |
|
102 |
//" \"test\".\"Decimal\",\n" + |
|
103 |
//" \"test\".\"Geometry\",\n" + |
|
104 |
//" EXISTS( SELECT \"test\".\"Long\" FROM \"countries\" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 ) AS \"EXISTS62a964cd7bc24f409b97c03b9170408d\"\n" + |
|
105 |
//"FROM \"test\"\n" + |
|
106 |
//"WHERE EXISTS( SELECT \"test\".\"Long\"\n" + |
|
107 |
//" FROM \"countries\"\n" + |
|
108 |
//" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0))\n" + |
|
109 |
//" LIMIT 1 )\n" + |
|
110 |
//"ORDER BY \"test\".\"ID\" ASC"; |
|
76 | 111 |
|
77 | 112 |
|
78 | 113 |
//Test STDistance (He a?adido la funcion ST_DISTANCE) |
... | ... | |
150 | 185 |
|
151 | 186 |
|
152 | 187 |
//ResultSetForSetProvider |
153 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC";
|
|
154 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC";
|
|
155 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Compu2\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC";
|
|
156 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra1\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC";
|
|
157 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Extra1\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra2\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC";
|
|
158 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Extra1\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra2\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC";
|
|
159 |
// String sql = "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", \"test\".\"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\" FROM \"test\" GROUP BY \"test\".\"Long\" ORDER BY \"test\".\"Long\" ASC NULLS LAST";
|
|
160 |
// String sql = "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", NULL AS \"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\", SUM((\"test\".\"Long\" + 10)) AS \"Extra1\", NULL AS \"Extra2\" FROM \"test\" ORDER BY MIN(\"test\".\"ID\") ASC, SUM((\"Long\" + 10)) ASC NULLS LAST";
|
|
161 |
// String sql = "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", \"test\".\"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\", SUM((\"test\".\"Long\" + 300)) AS \"Compu2\", SUM(1) AS \"Compu3\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra1\", SUM(((20 + \"test\".\"Byte\") + (\"test\".\"ID\" * 2))) AS \"Extra2\" FROM \"test\" GROUP BY \"test\".\"Long\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)), (\"test\".\"ID\" * 2) ORDER BY \"test\".\"Long\" ASC NULLS LAST, ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) ASC NULLS LAST, (\"test\".\"ID\" * 2) ASC NULLS LAST";
|
|
162 |
// String sql = "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", \"test\".\"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\", SUM((\"test\".\"Long\" + 300)) AS \"Compu2\", SUM(1) AS \"Compu3\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra1\", SUM(((20 + \"test\".\"Byte\") + (\"test\".\"ID\" * 2))) AS \"Extra2\", NULL AS \"Extra3\" FROM \"test\" GROUP BY \"test\".\"Long\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)), (\"test\".\"ID\" * 2) ORDER BY ((\"Long\" + 10) + (\"ID\" * 2)) ASC NULLS LAST, SUM(((20 + \"Byte\") + (\"ID\" * 2))) ASC NULLS LAST";
|
|
188 |
// sqls.add( "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC");
|
|
189 |
// sqls.add( "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC");
|
|
190 |
// sqls.add( "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Compu2\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC");
|
|
191 |
// sqls.add( "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra1\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC");
|
|
192 |
// sqls.add( "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Extra1\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra2\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC");
|
|
193 |
// sqls.add( "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", (\"test\".\"ID\" * 2) AS \"Extra1\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra2\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC");
|
|
194 |
// sqls.add( "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", \"test\".\"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\" FROM \"test\" GROUP BY \"test\".\"Long\" ORDER BY \"test\".\"Long\" ASC NULLS LAST");
|
|
195 |
// sqls.add( "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", NULL AS \"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\", SUM((\"test\".\"Long\" + 10)) AS \"Extra1\", NULL AS \"Extra2\" FROM \"test\" ORDER BY MIN(\"test\".\"ID\") ASC, SUM((\"Long\" + 10)) ASC NULLS LAST");
|
|
196 |
// sqls.add( "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", \"test\".\"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\", SUM((\"test\".\"Long\" + 300)) AS \"Compu2\", SUM(1) AS \"Compu3\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra1\", SUM(((20 + \"test\".\"Byte\") + (\"test\".\"ID\" * 2))) AS \"Extra2\" FROM \"test\" GROUP BY \"test\".\"Long\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)), (\"test\".\"ID\" * 2) ORDER BY \"test\".\"Long\" ASC NULLS LAST, ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) ASC NULLS LAST, (\"test\".\"ID\" * 2) ASC NULLS LAST");
|
|
197 |
// sqls.add( "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", \"test\".\"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\", (\"test\".\"ID\" * 2) AS \"Compu1\", SUM((\"test\".\"Long\" + 300)) AS \"Compu2\", SUM(1) AS \"Compu3\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)) AS \"Extra1\", SUM(((20 + \"test\".\"Byte\") + (\"test\".\"ID\" * 2))) AS \"Extra2\", NULL AS \"Extra3\" FROM \"test\" GROUP BY \"test\".\"Long\", ((\"test\".\"Long\" + 10) + (\"test\".\"ID\" * 2)), (\"test\".\"ID\" * 2) ORDER BY ((\"Long\" + 10) + (\"ID\" * 2)) ASC NULLS LAST, SUM(((20 + \"Byte\") + (\"ID\" * 2))) ASC NULLS LAST");
|
|
163 | 198 |
|
164 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", EXISTS(( SELECT \"countries\".\"ISO_A2\" FROM \"countries\" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) AS \"EXISTS62a964cd7bc24f409b97c03b9170408d\" FROM \"test\" WHERE EXISTS(( SELECT \"countries\".\"ISO_A2\" FROM \"countries\" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) ORDER BY \"test\".\"ID\" ASC"; //* |
|
199 |
// sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", EXISTS(( SELECT \"countries\".\"ISO_A2\" FROM \"countries\" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) AS \"EXISTS62a964cd7bc24f409b97c03b9170408d\" FROM \"test\" WHERE EXISTS(( SELECT \"countries\".\"ISO_A2\" FROM \"countries\" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) ORDER BY \"test\".\"ID\" ASC"; //* |
|
200 |
sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\" FROM \"test\" WHERE ( (\"test\".\"ID\") = (4) ) LIMIT 1"; |
|
165 | 201 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\", EXISTS(( SELECT \"test\".\"Long\" FROM \"countries\" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) AS \"EXISTS62a964cd7bc24f409b97c03b9170408d\" FROM \"test\" WHERE EXISTS(( SELECT \"test\".\"Long\" FROM \"countries\" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) ORDER BY \"test\".\"ID\" ASC"; //* |
166 | 202 |
// String sql = "SELECT MIN(\"test\".\"ID\") AS \"ID\", MAX(\"test\".\"Byte\") AS \"Byte\", NULL AS \"Bool1\", \"test\".\"Long\", NULL AS \"Timestamp\", NULL AS \"Date\", NULL AS \"Time\", NULL AS \"Bool2\", NULL AS \"String\", NULL AS \"Bool3\", SUM(\"test\".\"Double\") AS \"Double\", NULL AS \"Bool4\", NULL AS \"Float\", NULL AS \"Bool5\", NULL AS \"Decimal\", NULL AS \"Geometry\" FROM \"test\" WHERE EXISTS(( SELECT \"countries\".\"ISO_A2\" FROM \"countries\" WHERE ((\"test\".\"STRING\" = \"countries\".\"CONTINENT\") AND (\"countries\".\"LASTCENSUS\" < 0)) LIMIT 1 )) GROUP BY \"test\".\"Long\" ORDER BY \"test\".\"Long\" ASC NULLS LAST"; //* |
167 | 203 |
|
168 | 204 |
// String sql = "SELECT \"test\".\"ID\", \"test\".\"Byte\", \"test\".\"Bool1\", \"test\".\"Long\", \"test\".\"Timestamp\", \"test\".\"Date\", \"test\".\"Time\", \"test\".\"Bool2\", \"test\".\"String\", \"test\".\"Bool3\", \"test\".\"Double\", \"test\".\"Bool4\", \"test\".\"Float\", \"test\".\"Bool5\", \"test\".\"Decimal\", \"test\".\"Geometry\" FROM \"test\" ORDER BY \"test\".\"ID\" ASC"; |
169 | 205 |
|
170 |
String sql = ""; |
Also available in: Unified diff