QGIS API Documentation  3.24.2-Tisler (13c1a02865)
qgsabstractdatabaseproviderconnection.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsabstractdatabaseproviderconnection.cpp - QgsAbstractDatabaseProviderConnection
3 
4  ---------------------
5  begin : 2.8.2019
6  copyright : (C) 2019 by Alessandro Pasotti
7  email : elpaso at itopen dot it
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
17 #include "qgsvectorlayer.h"
18 #include "qgsexception.h"
19 #include "qgslogger.h"
20 #include "qgsfeedback.h"
21 
22 #include <QVariant>
23 #include <QObject>
24 
27 {
28 
29 }
30 
31 QgsAbstractDatabaseProviderConnection::QgsAbstractDatabaseProviderConnection( const QString &uri, const QVariantMap &configuration ):
32  QgsAbstractProviderConnection( uri, configuration )
33 {
34 
35 }
36 QgsAbstractDatabaseProviderConnection::Capabilities QgsAbstractDatabaseProviderConnection::capabilities() const
37 {
38  return mCapabilities;
39 }
40 
41 QgsAbstractDatabaseProviderConnection::GeometryColumnCapabilities QgsAbstractDatabaseProviderConnection::geometryColumnCapabilities()
42 {
44 }
45 
47 {
49 }
50 
51 
52 QString QgsAbstractDatabaseProviderConnection::tableUri( const QString &schema, const QString &name ) const
53 {
54  Q_UNUSED( schema )
55  Q_UNUSED( name )
56  throw QgsProviderConnectionException( QObject::tr( "Operation 'tableUri' is not supported" ) );
57 }
58 
59 
61 void QgsAbstractDatabaseProviderConnection::checkCapability( QgsAbstractDatabaseProviderConnection::Capability capability ) const
62 {
63  if ( ! mCapabilities.testFlag( capability ) )
64  {
65  static QMetaEnum metaEnum = QMetaEnum::fromType<QgsAbstractDatabaseProviderConnection::Capability>();
66  const QString capName { metaEnum.valueToKey( capability ) };
67  throw QgsProviderConnectionException( QObject::tr( "Operation '%1' is not supported for this connection" ).arg( capName ) );
68  }
69 }
70 
72 {
73  return mProviderKey;
74 }
75 
77 
78 
79 QMultiMap<Qgis::SqlKeywordCategory, QStringList> QgsAbstractDatabaseProviderConnection::sqlDictionary()
80 {
81  return
82  {
83  // Common constants
84  {
86  QStringLiteral( "NULL" ),
87  QStringLiteral( "FALSE" ),
88  QStringLiteral( "TRUE" ),
89  }
90  },
91  // Common SQL reserved words
92  // From: GET https://en.wikipedia.org/wiki/SQL_reserved_words| grep 'style="background: #ececec; color: black; font-weight: bold;'| sed -e 's/.*>//'|sort
93  {
95  {
96  QStringLiteral( "ABORT " ),
97  QStringLiteral( "ABORTSESSION" ),
98  QStringLiteral( "ABS" ),
99  QStringLiteral( "ABSOLUTE" ),
100  QStringLiteral( "ACCESS" ),
101  QStringLiteral( "ACCESSIBLE" ),
102  QStringLiteral( "ACCESS_LOCK" ),
103  QStringLiteral( "ACCOUNT" ),
104  QStringLiteral( "ACOS" ),
105  QStringLiteral( "ACOSH" ),
106  QStringLiteral( "ACTION" ),
107  QStringLiteral( "ADD" ),
108  QStringLiteral( "ADD_MONTHS" ),
109  QStringLiteral( "ADMIN" ),
110  QStringLiteral( "AFTER" ),
111  QStringLiteral( "AGGREGATE" ),
112  QStringLiteral( "ALIAS" ),
113  QStringLiteral( "ALL" ),
114  QStringLiteral( "ALLOCATE" ),
115  QStringLiteral( "ALLOW" ),
116  QStringLiteral( "ALTER" ),
117  QStringLiteral( "ALTERAND" ),
118  QStringLiteral( "AMP" ),
119  QStringLiteral( "ANALYSE" ),
120  QStringLiteral( "ANALYZE" ),
121  QStringLiteral( "AND" ),
122  QStringLiteral( "ANSIDATE" ),
123  QStringLiteral( "ANY" ),
124  QStringLiteral( "ARE" ),
125  QStringLiteral( "ARRAY" ),
126  QStringLiteral( "ARRAY_AGG" ),
127  QStringLiteral( "ARRAY_EXISTS" ),
128  QStringLiteral( "ARRAY_MAX_CARDINALITY" ),
129  QStringLiteral( "AS" ),
130  QStringLiteral( "ASC" ),
131  QStringLiteral( "ASENSITIVE" ),
132  QStringLiteral( "ASIN" ),
133  QStringLiteral( "ASINH" ),
134  QStringLiteral( "ASSERTION" ),
135  QStringLiteral( "ASSOCIATE" ),
136  QStringLiteral( "ASUTIME" ),
137  QStringLiteral( "ASYMMETRIC" ),
138  QStringLiteral( "AT" ),
139  QStringLiteral( "ATAN" ),
140  QStringLiteral( "ATAN2" ),
141  QStringLiteral( "ATANH" ),
142  QStringLiteral( "ATOMIC" ),
143  QStringLiteral( "AUDIT" ),
144  QStringLiteral( "AUTHORIZATION" ),
145  QStringLiteral( "AUX" ),
146  QStringLiteral( "AUXILIARY" ),
147  QStringLiteral( "AVE" ),
148  QStringLiteral( "AVERAGE" ),
149  QStringLiteral( "AVG" ),
150  QStringLiteral( "BACKUP" ),
151  QStringLiteral( "BEFORE" ),
152  QStringLiteral( "BEGIN" ),
153  QStringLiteral( "BEGIN_FRAME" ),
154  QStringLiteral( "BEGIN_PARTITION" ),
155  QStringLiteral( "BETWEEN" ),
156  QStringLiteral( "BIGINT" ),
157  QStringLiteral( "BINARY" ),
158  QStringLiteral( "BIT" ),
159  QStringLiteral( "BLOB" ),
160  QStringLiteral( "BOOLEAN" ),
161  QStringLiteral( "BOTH" ),
162  QStringLiteral( "BREADTH" ),
163  QStringLiteral( "BREAK" ),
164  QStringLiteral( "BROWSE" ),
165  QStringLiteral( "BT" ),
166  QStringLiteral( "BUFFERPOOL" ),
167  QStringLiteral( "BULK" ),
168  QStringLiteral( "BUT" ),
169  QStringLiteral( "BY" ),
170  QStringLiteral( "BYTE" ),
171  QStringLiteral( "BYTEINT" ),
172  QStringLiteral( "BYTES" ),
173  QStringLiteral( "CALL" ),
174  QStringLiteral( "CALLED" ),
175  QStringLiteral( "CAPTURE" ),
176  QStringLiteral( "CARDINALITY" ),
177  QStringLiteral( "CASCADE" ),
178  QStringLiteral( "CASCADED" ),
179  QStringLiteral( "CASE" ),
180  QStringLiteral( "CASE_N" ),
181  QStringLiteral( "CASESPECIFIC" ),
182  QStringLiteral( "CAST" ),
183  QStringLiteral( "CATALOG" ),
184  QStringLiteral( "CCSID" ),
185  QStringLiteral( "CD" ),
186  QStringLiteral( "CEIL" ),
187  QStringLiteral( "CEILING" ),
188  QStringLiteral( "CHANGE" ),
189  QStringLiteral( "CHAR" ),
190  QStringLiteral( "CHAR2HEXINT" ),
191  QStringLiteral( "CHARACTER" ),
192  QStringLiteral( "CHARACTER_LENGTH" ),
193  QStringLiteral( "CHARACTERS" ),
194  QStringLiteral( "CHAR_LENGTH" ),
195  QStringLiteral( "CHARS" ),
196  QStringLiteral( "CHECK" ),
197  QStringLiteral( "CHECKPOINT" ),
198  QStringLiteral( "CLASS" ),
199  QStringLiteral( "CLASSIFIER" ),
200  QStringLiteral( "CLOB" ),
201  QStringLiteral( "CLONE" ),
202  QStringLiteral( "CLOSE" ),
203  QStringLiteral( "CLUSTER" ),
204  QStringLiteral( "CLUSTERED" ),
205  QStringLiteral( "CM" ),
206  QStringLiteral( "COALESCE" ),
207  QStringLiteral( "COLLATE" ),
208  QStringLiteral( "COLLATION" ),
209  QStringLiteral( "COLLECT" ),
210  QStringLiteral( "COLLECTION" ),
211  QStringLiteral( "COLLID" ),
212  QStringLiteral( "COLUMN" ),
213  QStringLiteral( "COLUMN_VALUE" ),
214  QStringLiteral( "COMMENT" ),
215  QStringLiteral( "COMMIT" ),
216  QStringLiteral( "COMPLETION" ),
217  QStringLiteral( "COMPRESS" ),
218  QStringLiteral( "COMPUTE" ),
219  QStringLiteral( "CONCAT" ),
220  QStringLiteral( "CONCURRENTLY" ),
221  QStringLiteral( "CONDITION" ),
222  QStringLiteral( "CONNECT" ),
223  QStringLiteral( "CONNECTION" ),
224  QStringLiteral( "CONSTRAINT" ),
225  QStringLiteral( "CONSTRAINTS" ),
226  QStringLiteral( "CONSTRUCTOR" ),
227  QStringLiteral( "CONTAINS" ),
228  QStringLiteral( "CONTAINSTABLE" ),
229  QStringLiteral( "CONTENT" ),
230  QStringLiteral( "CONTINUE" ),
231  QStringLiteral( "CONVERT" ),
232  QStringLiteral( "CONVERT_TABLE_HEADER" ),
233  QStringLiteral( "COPY" ),
234  QStringLiteral( "CORR" ),
235  QStringLiteral( "CORRESPONDING" ),
236  QStringLiteral( "COS" ),
237  QStringLiteral( "COSH" ),
238  QStringLiteral( "COUNT" ),
239  QStringLiteral( "COVAR_POP" ),
240  QStringLiteral( "COVAR_SAMP" ),
241  QStringLiteral( "CREATE" ),
242  QStringLiteral( "CROSS" ),
243  QStringLiteral( "CS" ),
244  QStringLiteral( "CSUM" ),
245  QStringLiteral( "CT" ),
246  QStringLiteral( "CUBE" ),
247  QStringLiteral( "CUME_DIST" ),
248  QStringLiteral( "CURRENT" ),
249  QStringLiteral( "CURRENT_CATALOG" ),
250  QStringLiteral( "CURRENT_DATE" ),
251  QStringLiteral( "CURRENT_DEFAULT_TRANSFORM_GROUP" ),
252  QStringLiteral( "CURRENT_LC_CTYPE" ),
253  QStringLiteral( "CURRENT_PATH" ),
254  QStringLiteral( "CURRENT_ROLE" ),
255  QStringLiteral( "CURRENT_ROW" ),
256  QStringLiteral( "CURRENT_SCHEMA" ),
257  QStringLiteral( "CURRENT_SERVER" ),
258  QStringLiteral( "CURRENT_TIME" ),
259  QStringLiteral( "CURRENT_TIMESTAMP" ),
260  QStringLiteral( "CURRENT_TIMEZONE" ),
261  QStringLiteral( "CURRENT_TRANSFORM_GROUP_FOR_TYPE" ),
262  QStringLiteral( "CURRENT_USER" ),
263  QStringLiteral( "CURRVAL" ),
264  QStringLiteral( "CURSOR" ),
265  QStringLiteral( "CV" ),
266  QStringLiteral( "CYCLE" ),
267  QStringLiteral( "DATA" ),
268  QStringLiteral( "DATABASE" ),
269  QStringLiteral( "DATABASES" ),
270  QStringLiteral( "DATABLOCKSIZE" ),
271  QStringLiteral( "DATE" ),
272  QStringLiteral( "DATEFORM" ),
273  QStringLiteral( "DAY" ),
274  QStringLiteral( "DAY_HOUR" ),
275  QStringLiteral( "DAY_MICROSECOND" ),
276  QStringLiteral( "DAY_MINUTE" ),
277  QStringLiteral( "DAYS" ),
278  QStringLiteral( "DAY_SECOND" ),
279  QStringLiteral( "DBCC" ),
280  QStringLiteral( "DBINFO" ),
281  QStringLiteral( "DEALLOCATE" ),
282  QStringLiteral( "DEC" ),
283  QStringLiteral( "DECFLOAT" ),
284  QStringLiteral( "DECIMAL" ),
285  QStringLiteral( "DECLARE" ),
286  QStringLiteral( "DEFAULT" ),
287  QStringLiteral( "DEFERRABLE" ),
288  QStringLiteral( "DEFERRED" ),
289  QStringLiteral( "DEFINE" ),
290  QStringLiteral( "DEGREES" ),
291  QStringLiteral( "DEL" ),
292  QStringLiteral( "DELAYED" ),
293  QStringLiteral( "DELETE" ),
294  QStringLiteral( "DENSE_RANK" ),
295  QStringLiteral( "DENY" ),
296  QStringLiteral( "DEPTH" ),
297  QStringLiteral( "DEREF" ),
298  QStringLiteral( "DESC" ),
299  QStringLiteral( "DESCRIBE" ),
300  QStringLiteral( "DESCRIPTOR" ),
301  QStringLiteral( "DESTROY" ),
302  QStringLiteral( "DESTRUCTOR" ),
303  QStringLiteral( "DETERMINISTIC" ),
304  QStringLiteral( "DIAGNOSTIC" ),
305  QStringLiteral( "DIAGNOSTICS" ),
306  QStringLiteral( "DICTIONARY" ),
307  QStringLiteral( "DISABLE" ),
308  QStringLiteral( "DISABLED" ),
309  QStringLiteral( "DISALLOW" ),
310  QStringLiteral( "DISCONNECT" ),
311  QStringLiteral( "DISK" ),
312  QStringLiteral( "DISTINCT" ),
313  QStringLiteral( "DISTINCTROW" ),
314  QStringLiteral( "DISTRIBUTED" ),
315  QStringLiteral( "DIV" ),
316  QStringLiteral( "DO" ),
317  QStringLiteral( "DOCUMENT" ),
318  QStringLiteral( "DOMAIN" ),
319  QStringLiteral( "DOUBLE" ),
320  QStringLiteral( "DROP" ),
321  QStringLiteral( "DSSIZE" ),
322  QStringLiteral( "DUAL" ),
323  QStringLiteral( "DUMP" ),
324  QStringLiteral( "DYNAMIC" ),
325  QStringLiteral( "EACH" ),
326  QStringLiteral( "ECHO" ),
327  QStringLiteral( "EDITPROC" ),
328  QStringLiteral( "ELEMENT" ),
329  QStringLiteral( "ELSE" ),
330  QStringLiteral( "ELSEIF" ),
331  QStringLiteral( "EMPTY" ),
332  QStringLiteral( "ENABLED" ),
333  QStringLiteral( "ENCLOSED" ),
334  QStringLiteral( "ENCODING" ),
335  QStringLiteral( "ENCRYPTION" ),
336  QStringLiteral( "END" ),
337  QStringLiteral( "END-EXEC" ),
338  QStringLiteral( "END_FRAME" ),
339  QStringLiteral( "ENDING" ),
340  QStringLiteral( "END_PARTITION" ),
341  QStringLiteral( "EQ" ),
342  QStringLiteral( "EQUALS" ),
343  QStringLiteral( "ERASE" ),
344  QStringLiteral( "ERRLVL" ),
345  QStringLiteral( "ERROR" ),
346  QStringLiteral( "ERRORFILES" ),
347  QStringLiteral( "ERRORTABLES" ),
348  QStringLiteral( "ESCAPE" ),
349  QStringLiteral( "ESCAPED" ),
350  QStringLiteral( "ET" ),
351  QStringLiteral( "EVERY" ),
352  QStringLiteral( "EXCEPT" ),
353  QStringLiteral( "EXCEPTION" ),
354  QStringLiteral( "EXCLUSIVE" ),
355  QStringLiteral( "EXEC" ),
356  QStringLiteral( "EXECUTE" ),
357  QStringLiteral( "EXISTS" ),
358  QStringLiteral( "EXIT" ),
359  QStringLiteral( "EXP" ),
360  QStringLiteral( "EXPLAIN" ),
361  QStringLiteral( "EXTERNAL" ),
362  QStringLiteral( "EXTRACT" ),
363  QStringLiteral( "FALLBACK" ),
364  QStringLiteral( "FALSE" ),
365  QStringLiteral( "FASTEXPORT" ),
366  QStringLiteral( "FENCED" ),
367  QStringLiteral( "FETCH" ),
368  QStringLiteral( "FIELDPROC" ),
369  QStringLiteral( "FILE" ),
370  QStringLiteral( "FILLFACTOR" ),
371  QStringLiteral( "FILTER" ),
372  QStringLiteral( "FINAL" ),
373  QStringLiteral( "FIRST" ),
374  QStringLiteral( "FIRST_VALUE" ),
375  QStringLiteral( "FLOAT" ),
376  QStringLiteral( "FLOAT4" ),
377  QStringLiteral( "FLOAT8" ),
378  QStringLiteral( "FLOOR" ),
379  QStringLiteral( "FOR" ),
380  QStringLiteral( "FORCE" ),
381  QStringLiteral( "FOREIGN" ),
382  QStringLiteral( "FORMAT" ),
383  QStringLiteral( "FOUND" ),
384  QStringLiteral( "FRAME_ROW" ),
385  QStringLiteral( "FREE" ),
386  QStringLiteral( "FREESPACE" ),
387  QStringLiteral( "FREETEXT" ),
388  QStringLiteral( "FREETEXTTABLE" ),
389  QStringLiteral( "FREEZE" ),
390  QStringLiteral( "FROM" ),
391  QStringLiteral( "FULL" ),
392  QStringLiteral( "FULLTEXT" ),
393  QStringLiteral( "FUNCTION" ),
394  QStringLiteral( "FUSION" ),
395  QStringLiteral( "GE" ),
396  QStringLiteral( "GENERAL" ),
397  QStringLiteral( "GENERATED" ),
398  QStringLiteral( "GET" ),
399  QStringLiteral( "GIVE" ),
400  QStringLiteral( "GLOBAL" ),
401  QStringLiteral( "GO" ),
402  QStringLiteral( "GOTO" ),
403  QStringLiteral( "GRANT" ),
404  QStringLiteral( "GRAPHIC" ),
405  QStringLiteral( "GROUP" ),
406  QStringLiteral( "GROUPING" ),
407  QStringLiteral( "GROUPS" ),
408  QStringLiteral( "GT" ),
409  QStringLiteral( "HANDLER" ),
410  QStringLiteral( "HASH" ),
411  QStringLiteral( "HASHAMP" ),
412  QStringLiteral( "HASHBAKAMP" ),
413  QStringLiteral( "HASHBUCKET" ),
414  QStringLiteral( "HASHROW" ),
415  QStringLiteral( "HAVING" ),
416  QStringLiteral( "HELP" ),
417  QStringLiteral( "HIGH_PRIORITY" ),
418  QStringLiteral( "HOLD" ),
419  QStringLiteral( "HOLDLOCK" ),
420  QStringLiteral( "HOST" ),
421  QStringLiteral( "HOUR" ),
422  QStringLiteral( "HOUR_MICROSECOND" ),
423  QStringLiteral( "HOUR_MINUTE" ),
424  QStringLiteral( "HOURS" ),
425  QStringLiteral( "HOUR_SECOND" ),
426  QStringLiteral( "IDENTIFIED" ),
427  QStringLiteral( "IDENTITY" ),
428  QStringLiteral( "IDENTITYCOL" ),
429  QStringLiteral( "IDENTITY_INSERT" ),
430  QStringLiteral( "IF" ),
431  QStringLiteral( "IGNORE" ),
432  QStringLiteral( "ILIKE" ),
433  QStringLiteral( "IMMEDIATE" ),
434  QStringLiteral( "IN" ),
435  QStringLiteral( "INCLUSIVE" ),
436  QStringLiteral( "INCONSISTENT" ),
437  QStringLiteral( "INCREMENT" ),
438  QStringLiteral( "INDEX" ),
439  QStringLiteral( "INDICATOR" ),
440  QStringLiteral( "INFILE" ),
441  QStringLiteral( "INHERIT" ),
442  QStringLiteral( "INITIAL" ),
443  QStringLiteral( "INITIALIZE" ),
444  QStringLiteral( "INITIALLY" ),
445  QStringLiteral( "INITIATE" ),
446  QStringLiteral( "INNER" ),
447  QStringLiteral( "INOUT" ),
448  QStringLiteral( "INPUT" ),
449  QStringLiteral( "INS" ),
450  QStringLiteral( "INSENSITIVE" ),
451  QStringLiteral( "INSERT" ),
452  QStringLiteral( "INSTEAD" ),
453  QStringLiteral( "INT" ),
454  QStringLiteral( "INT1" ),
455  QStringLiteral( "INT2" ),
456  QStringLiteral( "INT3" ),
457  QStringLiteral( "INT4" ),
458  QStringLiteral( "INT8" ),
459  QStringLiteral( "INTEGER" ),
460  QStringLiteral( "INTEGERDATE" ),
461  QStringLiteral( "INTERSECT" ),
462  QStringLiteral( "INTERSECTION" ),
463  QStringLiteral( "INTERVAL" ),
464  QStringLiteral( "INTO" ),
465  QStringLiteral( "IO_AFTER_GTIDS" ),
466  QStringLiteral( "IO_BEFORE_GTIDS" ),
467  QStringLiteral( "IS" ),
468  QStringLiteral( "ISNULL" ),
469  QStringLiteral( "ISOBID" ),
470  QStringLiteral( "ISOLATION" ),
471  QStringLiteral( "ITERATE" ),
472  QStringLiteral( "JAR" ),
473  QStringLiteral( "JOIN" ),
474  QStringLiteral( "JOURNAL" ),
475  QStringLiteral( "JSON_ARRAY" ),
476  QStringLiteral( "JSON_ARRAYAGG" ),
477  QStringLiteral( "JSON_EXISTS" ),
478  QStringLiteral( "JSON_OBJECT" ),
479  QStringLiteral( "JSON_OBJECTAGG" ),
480  QStringLiteral( "JSON_QUERY" ),
481  QStringLiteral( "JSON_TABLE" ),
482  QStringLiteral( "JSON_TABLE_PRIMITIVE" ),
483  QStringLiteral( "JSON_VALUE" ),
484  QStringLiteral( "KEEP" ),
485  QStringLiteral( "KEY" ),
486  QStringLiteral( "KEYS" ),
487  QStringLiteral( "KILL" ),
488  QStringLiteral( "KURTOSIS" ),
489  QStringLiteral( "LABEL" ),
490  QStringLiteral( "LAG" ),
491  QStringLiteral( "LANGUAGE" ),
492  QStringLiteral( "LARGE" ),
493  QStringLiteral( "LAST" ),
494  QStringLiteral( "LAST_VALUE" ),
495  QStringLiteral( "LATERAL" ),
496  QStringLiteral( "LC_CTYPE" ),
497  QStringLiteral( "LE" ),
498  QStringLiteral( "LEAD" ),
499  QStringLiteral( "LEADING" ),
500  QStringLiteral( "LEAVE" ),
501  QStringLiteral( "LEFT" ),
502  QStringLiteral( "LESS" ),
503  QStringLiteral( "LEVEL" ),
504  QStringLiteral( "LIKE" ),
505  QStringLiteral( "LIKE_REGEX" ),
506  QStringLiteral( "LIMIT" ),
507  QStringLiteral( "LINEAR" ),
508  QStringLiteral( "LINENO" ),
509  QStringLiteral( "LINES" ),
510  QStringLiteral( "LISTAGG" ),
511  QStringLiteral( "LN" ),
512  QStringLiteral( "LOAD" ),
513  QStringLiteral( "LOADING" ),
514  QStringLiteral( "LOCAL" ),
515  QStringLiteral( "LOCALE" ),
516  QStringLiteral( "LOCALTIME" ),
517  QStringLiteral( "LOCALTIMESTAMP" ),
518  QStringLiteral( "LOCATOR" ),
519  QStringLiteral( "LOCATORS" ),
520  QStringLiteral( "LOCK" ),
521  QStringLiteral( "LOCKING" ),
522  QStringLiteral( "LOCKMAX" ),
523  QStringLiteral( "LOCKSIZE" ),
524  QStringLiteral( "LOG" ),
525  QStringLiteral( "LOG10" ),
526  QStringLiteral( "LOGGING" ),
527  QStringLiteral( "LOGON" ),
528  QStringLiteral( "LONG" ),
529  QStringLiteral( "LONGBLOB" ),
530  QStringLiteral( "LONGTEXT" ),
531  QStringLiteral( "LOOP" ),
532  QStringLiteral( "LOWER" ),
533  QStringLiteral( "LOW_PRIORITY" ),
534  QStringLiteral( "LT" ),
535  QStringLiteral( "MACRO" ),
536  QStringLiteral( "MAINTAINED" ),
537  QStringLiteral( "MAP" ),
538  QStringLiteral( "MASTER_BIND" ),
539  QStringLiteral( "MASTER_SSL_VERIFY_SERVER_CERT" ),
540  QStringLiteral( "MATCH" ),
541  QStringLiteral( "MATCHES" ),
542  QStringLiteral( "MATCH_NUMBER" ),
543  QStringLiteral( "MATCH_RECOGNIZE" ),
544  QStringLiteral( "MATERIALIZED" ),
545  QStringLiteral( "MAVG" ),
546  QStringLiteral( "MAX" ),
547  QStringLiteral( "MAXEXTENTS" ),
548  QStringLiteral( "MAXIMUM" ),
549  QStringLiteral( "MAXVALUE" ),
550  QStringLiteral( "MCHARACTERS" ),
551  QStringLiteral( "MDIFF" ),
552  QStringLiteral( "MEDIUMBLOB" ),
553  QStringLiteral( "MEDIUMINT" ),
554  QStringLiteral( "MEDIUMTEXT" ),
555  QStringLiteral( "MEMBER" ),
556  QStringLiteral( "MERGE" ),
557  QStringLiteral( "METHOD" ),
558  QStringLiteral( "MICROSECOND" ),
559  QStringLiteral( "MICROSECONDS" ),
560  QStringLiteral( "MIDDLEINT" ),
561  QStringLiteral( "MIN" ),
562  QStringLiteral( "MINDEX" ),
563  QStringLiteral( "MINIMUM" ),
564  QStringLiteral( "MINUS" ),
565  QStringLiteral( "MINUTE" ),
566  QStringLiteral( "MINUTE_MICROSECOND" ),
567  QStringLiteral( "MINUTES" ),
568  QStringLiteral( "MINUTE_SECOND" ),
569  QStringLiteral( "MLINREG" ),
570  QStringLiteral( "MLOAD" ),
571  QStringLiteral( "MLSLABEL" ),
572  QStringLiteral( "MOD" ),
573  QStringLiteral( "MODE" ),
574  QStringLiteral( "MODIFIES" ),
575  QStringLiteral( "MODIFY" ),
576  QStringLiteral( "MODULE" ),
577  QStringLiteral( "MONITOR" ),
578  QStringLiteral( "MONRESOURCE" ),
579  QStringLiteral( "MONSESSION" ),
580  QStringLiteral( "MONTH" ),
581  QStringLiteral( "MONTHS" ),
582  QStringLiteral( "MSUBSTR" ),
583  QStringLiteral( "MSUM" ),
584  QStringLiteral( "MULTISET" ),
585  QStringLiteral( "NAMED" ),
586  QStringLiteral( "NAMES" ),
587  QStringLiteral( "NATIONAL" ),
588  QStringLiteral( "NATURAL" ),
589  QStringLiteral( "NCHAR" ),
590  QStringLiteral( "NCLOB" ),
591  QStringLiteral( "NE" ),
592  QStringLiteral( "NESTED_TABLE_ID" ),
593  QStringLiteral( "NEW" ),
594  QStringLiteral( "NEW_TABLE" ),
595  QStringLiteral( "NEXT" ),
596  QStringLiteral( "NEXTVAL" ),
597  QStringLiteral( "NO" ),
598  QStringLiteral( "NOAUDIT" ),
599  QStringLiteral( "NOCHECK" ),
600  QStringLiteral( "NOCOMPRESS" ),
601  QStringLiteral( "NONCLUSTERED" ),
602  QStringLiteral( "NONE" ),
603  QStringLiteral( "NORMALIZE" ),
604  QStringLiteral( "NOT" ),
605  QStringLiteral( "NOTNULL" ),
606  QStringLiteral( "NOWAIT" ),
607  QStringLiteral( "NO_WRITE_TO_BINLOG" ),
608  QStringLiteral( "NTH_VALUE" ),
609  QStringLiteral( "NTILE" ),
610  QStringLiteral( "NULL" ),
611  QStringLiteral( "NULLIF" ),
612  QStringLiteral( "NULLIFZERO" ),
613  QStringLiteral( "NULLS" ),
614  QStringLiteral( "NUMBER" ),
615  QStringLiteral( "NUMERIC" ),
616  QStringLiteral( "NUMPARTS" ),
617  QStringLiteral( "OBID" ),
618  QStringLiteral( "OBJECT" ),
619  QStringLiteral( "OBJECTS" ),
620  QStringLiteral( "OCCURRENCES_REGEX" ),
621  QStringLiteral( "OCTET_LENGTH" ),
622  QStringLiteral( "OF" ),
623  QStringLiteral( "OFF" ),
624  QStringLiteral( "OFFLINE" ),
625  QStringLiteral( "OFFSET" ),
626  QStringLiteral( "OFFSETS" ),
627  QStringLiteral( "OLD" ),
628  QStringLiteral( "OLD_TABLE" ),
629  QStringLiteral( "OMIT" ),
630  QStringLiteral( "ON" ),
631  QStringLiteral( "ONE" ),
632  QStringLiteral( "ONLINE" ),
633  QStringLiteral( "ONLY" ),
634  QStringLiteral( "OPEN" ),
635  QStringLiteral( "OPENDATASOURCE" ),
636  QStringLiteral( "OPENQUERY" ),
637  QStringLiteral( "OPENROWSET" ),
638  QStringLiteral( "OPENXML" ),
639  QStringLiteral( "OPERATION" ),
640  QStringLiteral( "OPTIMIZATION" ),
641  QStringLiteral( "OPTIMIZE" ),
642  QStringLiteral( "OPTIMIZER_COSTS" ),
643  QStringLiteral( "OPTION" ),
644  QStringLiteral( "OPTIONALLY" ),
645  QStringLiteral( "OR" ),
646  QStringLiteral( "ORDER" ),
647  QStringLiteral( "ORDINALITY" ),
648  QStringLiteral( "ORGANIZATION" ),
649  QStringLiteral( "OUT" ),
650  QStringLiteral( "OUTER" ),
651  QStringLiteral( "OUTFILE" ),
652  QStringLiteral( "OUTPUT" ),
653  QStringLiteral( "OVER" ),
654  QStringLiteral( "OVERLAPS" ),
655  QStringLiteral( "OVERLAY" ),
656  QStringLiteral( "OVERRIDE" ),
657  QStringLiteral( "PACKAGE" ),
658  QStringLiteral( "PAD" ),
659  QStringLiteral( "PADDED" ),
660  QStringLiteral( "PARAMETER" ),
661  QStringLiteral( "PARAMETERS" ),
662  QStringLiteral( "PART" ),
663  QStringLiteral( "PARTIAL" ),
664  QStringLiteral( "PARTITION" ),
665  QStringLiteral( "PARTITIONED" ),
666  QStringLiteral( "PARTITIONING" ),
667  QStringLiteral( "PASSWORD" ),
668  QStringLiteral( "PATH" ),
669  QStringLiteral( "PATTERN" ),
670  QStringLiteral( "PCTFREE" ),
671  QStringLiteral( "PER" ),
672  QStringLiteral( "PERCENT" ),
673  QStringLiteral( "PERCENTILE_CONT" ),
674  QStringLiteral( "PERCENTILE_DISC" ),
675  QStringLiteral( "PERCENT_RANK" ),
676  QStringLiteral( "PERIOD" ),
677  QStringLiteral( "PERM" ),
678  QStringLiteral( "PERMANENT" ),
679  QStringLiteral( "PIECESIZE" ),
680  QStringLiteral( "PIVOT" ),
681  QStringLiteral( "PLACING" ),
682  QStringLiteral( "PLAN" ),
683  QStringLiteral( "PORTION" ),
684  QStringLiteral( "POSITION" ),
685  QStringLiteral( "POSITION_REGEX" ),
686  QStringLiteral( "POSTFIX" ),
687  QStringLiteral( "POWER" ),
688  QStringLiteral( "PRECEDES" ),
689  QStringLiteral( "PRECISION" ),
690  QStringLiteral( "PREFIX" ),
691  QStringLiteral( "PREORDER" ),
692  QStringLiteral( "PREPARE" ),
693  QStringLiteral( "PRESERVE" ),
694  QStringLiteral( "PREVVAL" ),
695  QStringLiteral( "PRIMARY" ),
696  QStringLiteral( "PRINT" ),
697  QStringLiteral( "PRIOR" ),
698  QStringLiteral( "PRIQTY" ),
699  QStringLiteral( "PRIVATE" ),
700  QStringLiteral( "PRIVILEGES" ),
701  QStringLiteral( "PROC" ),
702  QStringLiteral( "PROCEDURE" ),
703  QStringLiteral( "PROFILE" ),
704  QStringLiteral( "PROGRAM" ),
705  QStringLiteral( "PROPORTIONAL" ),
706  QStringLiteral( "PROTECTION" ),
707  QStringLiteral( "PSID" ),
708  QStringLiteral( "PTF" ),
709  QStringLiteral( "PUBLIC" ),
710  QStringLiteral( "PURGE" ),
711  QStringLiteral( "QUALIFIED" ),
712  QStringLiteral( "QUALIFY" ),
713  QStringLiteral( "QUANTILE" ),
714  QStringLiteral( "QUERY" ),
715  QStringLiteral( "QUERYNO" ),
716  QStringLiteral( "RADIANS" ),
717  QStringLiteral( "RAISERROR" ),
718  QStringLiteral( "RANDOM" ),
719  QStringLiteral( "RANGE" ),
720  QStringLiteral( "RANGE_N" ),
721  QStringLiteral( "RANK" ),
722  QStringLiteral( "RAW" ),
723  QStringLiteral( "READ" ),
724  QStringLiteral( "READS" ),
725  QStringLiteral( "READTEXT" ),
726  QStringLiteral( "READ_WRITE" ),
727  QStringLiteral( "REAL" ),
728  QStringLiteral( "RECONFIGURE" ),
729  QStringLiteral( "RECURSIVE" ),
730  QStringLiteral( "REF" ),
731  QStringLiteral( "REFERENCES" ),
732  QStringLiteral( "REFERENCING" ),
733  QStringLiteral( "REFRESH" ),
734  QStringLiteral( "REGEXP" ),
735  QStringLiteral( "REGR_AVGX" ),
736  QStringLiteral( "REGR_AVGY" ),
737  QStringLiteral( "REGR_COUNT" ),
738  QStringLiteral( "REGR_INTERCEPT" ),
739  QStringLiteral( "REGR_R2" ),
740  QStringLiteral( "REGR_SLOPE" ),
741  QStringLiteral( "REGR_SXX" ),
742  QStringLiteral( "REGR_SXY" ),
743  QStringLiteral( "REGR_SYY" ),
744  QStringLiteral( "RELATIVE" ),
745  QStringLiteral( "RELEASE" ),
746  QStringLiteral( "RENAME" ),
747  QStringLiteral( "REPEAT" ),
748  QStringLiteral( "REPLACE" ),
749  QStringLiteral( "REPLICATION" ),
750  QStringLiteral( "REPOVERRIDE" ),
751  QStringLiteral( "REQUEST" ),
752  QStringLiteral( "REQUIRE" ),
753  QStringLiteral( "RESIGNAL" ),
754  QStringLiteral( "RESOURCE" ),
755  QStringLiteral( "RESTART" ),
756  QStringLiteral( "RESTORE" ),
757  QStringLiteral( "RESTRICT" ),
758  QStringLiteral( "RESULT" ),
759  QStringLiteral( "RESULT_SET_LOCATOR" ),
760  QStringLiteral( "RESUME" ),
761  QStringLiteral( "RET" ),
762  QStringLiteral( "RETRIEVE" ),
763  QStringLiteral( "RETURN" ),
764  QStringLiteral( "RETURNING" ),
765  QStringLiteral( "RETURNS" ),
766  QStringLiteral( "REVALIDATE" ),
767  QStringLiteral( "REVERT" ),
768  QStringLiteral( "REVOKE" ),
769  QStringLiteral( "RIGHT" ),
770  QStringLiteral( "RIGHTS" ),
771  QStringLiteral( "RLIKE" ),
772  QStringLiteral( "ROLE" ),
773  QStringLiteral( "ROLLBACK" ),
774  QStringLiteral( "ROLLFORWARD" ),
775  QStringLiteral( "ROLLUP" ),
776  QStringLiteral( "ROUND_CEILING" ),
777  QStringLiteral( "ROUND_DOWN" ),
778  QStringLiteral( "ROUND_FLOOR" ),
779  QStringLiteral( "ROUND_HALF_DOWN" ),
780  QStringLiteral( "ROUND_HALF_EVEN" ),
781  QStringLiteral( "ROUND_HALF_UP" ),
782  QStringLiteral( "ROUND_UP" ),
783  QStringLiteral( "ROUTINE" ),
784  QStringLiteral( "ROW" ),
785  QStringLiteral( "ROWCOUNT" ),
786  QStringLiteral( "ROWGUIDCOL" ),
787  QStringLiteral( "ROWID" ),
788  QStringLiteral( "ROWNUM" ),
789  QStringLiteral( "ROW_NUMBER" ),
790  QStringLiteral( "ROWS" ),
791  QStringLiteral( "ROWSET" ),
792  QStringLiteral( "RULE" ),
793  QStringLiteral( "RUN" ),
794  QStringLiteral( "RUNNING" ),
795  QStringLiteral( "SAMPLE" ),
796  QStringLiteral( "SAMPLEID" ),
797  QStringLiteral( "SAVE" ),
798  QStringLiteral( "SAVEPOINT" ),
799  QStringLiteral( "SCHEMA" ),
800  QStringLiteral( "SCHEMAS" ),
801  QStringLiteral( "SCOPE" ),
802  QStringLiteral( "SCRATCHPAD" ),
803  QStringLiteral( "SCROLL" ),
804  QStringLiteral( "SEARCH" ),
805  QStringLiteral( "SECOND" ),
806  QStringLiteral( "SECOND_MICROSECOND" ),
807  QStringLiteral( "SECONDS" ),
808  QStringLiteral( "SECQTY" ),
809  QStringLiteral( "SECTION" ),
810  QStringLiteral( "SECURITY" ),
811  QStringLiteral( "SECURITYAUDIT" ),
812  QStringLiteral( "SEEK" ),
813  QStringLiteral( "SEL" ),
814  QStringLiteral( "SELECT" ),
815  QStringLiteral( "SEMANTICKEYPHRASETABLE" ),
816  QStringLiteral( "SEMANTICSIMILARITYDETAILSTABLE" ),
817  QStringLiteral( "SEMANTICSIMILARITYTABLE" ),
818  QStringLiteral( "SENSITIVE" ),
819  QStringLiteral( "SEPARATOR" ),
820  QStringLiteral( "SEQUENCE" ),
821  QStringLiteral( "SESSION" ),
822  QStringLiteral( "SESSION_USER" ),
823  QStringLiteral( "SET" ),
824  QStringLiteral( "SETRESRATE" ),
825  QStringLiteral( "SETS" ),
826  QStringLiteral( "SETSESSRATE" ),
827  QStringLiteral( "SETUSER" ),
828  QStringLiteral( "SHARE" ),
829  QStringLiteral( "SHOW" ),
830  QStringLiteral( "SHUTDOWN" ),
831  QStringLiteral( "SIGNAL" ),
832  QStringLiteral( "SIMILAR" ),
833  QStringLiteral( "SIMPLE" ),
834  QStringLiteral( "SIN" ),
835  QStringLiteral( "SINH" ),
836  QStringLiteral( "SIZE" ),
837  QStringLiteral( "SKEW" ),
838  QStringLiteral( "SKIP" ),
839  QStringLiteral( "SMALLINT" ),
840  QStringLiteral( "SOME" ),
841  QStringLiteral( "SOUNDEX" ),
842  QStringLiteral( "SOURCE" ),
843  QStringLiteral( "SPACE" ),
844  QStringLiteral( "SPATIAL" ),
845  QStringLiteral( "SPECIFIC" ),
846  QStringLiteral( "SPECIFICTYPE" ),
847  QStringLiteral( "SPOOL" ),
848  QStringLiteral( "SQL" ),
849  QStringLiteral( "SQL_BIG_RESULT" ),
850  QStringLiteral( "SQL_CALC_FOUND_ROWS" ),
851  QStringLiteral( "SQLEXCEPTION" ),
852  QStringLiteral( "SQL_SMALL_RESULT" ),
853  QStringLiteral( "SQLSTATE" ),
854  QStringLiteral( "SQLTEXT" ),
855  QStringLiteral( "SQLWARNING" ),
856  QStringLiteral( "SQRT" ),
857  QStringLiteral( "SS" ),
858  QStringLiteral( "SSL" ),
859  QStringLiteral( "STANDARD" ),
860  QStringLiteral( "START" ),
861  QStringLiteral( "STARTING" ),
862  QStringLiteral( "STARTUP" ),
863  QStringLiteral( "STATE" ),
864  QStringLiteral( "STATEMENT" ),
865  QStringLiteral( "STATIC" ),
866  QStringLiteral( "STATISTICS" ),
867  QStringLiteral( "STAY" ),
868  QStringLiteral( "STDDEV_POP" ),
869  QStringLiteral( "STDDEV_SAMP" ),
870  QStringLiteral( "STEPINFO" ),
871  QStringLiteral( "STOGROUP" ),
872  QStringLiteral( "STORED" ),
873  QStringLiteral( "STORES" ),
874  QStringLiteral( "STRAIGHT_JOIN" ),
875  QStringLiteral( "STRING_CS" ),
876  QStringLiteral( "STRUCTURE" ),
877  QStringLiteral( "STYLE" ),
878  QStringLiteral( "SUBMULTISET" ),
879  QStringLiteral( "SUBSCRIBER" ),
880  QStringLiteral( "SUBSET" ),
881  QStringLiteral( "SUBSTR" ),
882  QStringLiteral( "SUBSTRING" ),
883  QStringLiteral( "SUBSTRING_REGEX" ),
884  QStringLiteral( "SUCCEEDS" ),
885  QStringLiteral( "SUCCESSFUL" ),
886  QStringLiteral( "SUM" ),
887  QStringLiteral( "SUMMARY" ),
888  QStringLiteral( "SUSPEND" ),
889  QStringLiteral( "SYMMETRIC" ),
890  QStringLiteral( "SYNONYM" ),
891  QStringLiteral( "SYSDATE" ),
892  QStringLiteral( "SYSTEM" ),
893  QStringLiteral( "SYSTEM_TIME" ),
894  QStringLiteral( "SYSTEM_USER" ),
895  QStringLiteral( "SYSTIMESTAMP" ),
896  QStringLiteral( "TABLE" ),
897  QStringLiteral( "TABLESAMPLE" ),
898  QStringLiteral( "TABLESPACE" ),
899  QStringLiteral( "TAN" ),
900  QStringLiteral( "TANH" ),
901  QStringLiteral( "TBL_CS" ),
902  QStringLiteral( "TEMPORARY" ),
903  QStringLiteral( "TERMINATE" ),
904  QStringLiteral( "TERMINATED" ),
905  QStringLiteral( "TEXTSIZE" ),
906  QStringLiteral( "THAN" ),
907  QStringLiteral( "THEN" ),
908  QStringLiteral( "THRESHOLD" ),
909  QStringLiteral( "TIME" ),
910  QStringLiteral( "TIMESTAMP" ),
911  QStringLiteral( "TIMEZONE_HOUR" ),
912  QStringLiteral( "TIMEZONE_MINUTE" ),
913  QStringLiteral( "TINYBLOB" ),
914  QStringLiteral( "TINYINT" ),
915  QStringLiteral( "TINYTEXT" ),
916  QStringLiteral( "TITLE" ),
917  QStringLiteral( "TO" ),
918  QStringLiteral( "TOP" ),
919  QStringLiteral( "TRACE" ),
920  QStringLiteral( "TRAILING" ),
921  QStringLiteral( "TRAN" ),
922  QStringLiteral( "TRANSACTION" ),
923  QStringLiteral( "TRANSLATE" ),
924  QStringLiteral( "TRANSLATE_CHK" ),
925  QStringLiteral( "TRANSLATE_REGEX" ),
926  QStringLiteral( "TRANSLATION" ),
927  QStringLiteral( "TREAT" ),
928  QStringLiteral( "TRIGGER" ),
929  QStringLiteral( "TRIM" ),
930  QStringLiteral( "TRIM_ARRAY" ),
931  QStringLiteral( "TRUE" ),
932  QStringLiteral( "TRUNCATE" ),
933  QStringLiteral( "TRY_CONVERT" ),
934  QStringLiteral( "TSEQUAL" ),
935  QStringLiteral( "TYPE" ),
936  QStringLiteral( "UC" ),
937  QStringLiteral( "UESCAPE" ),
938  QStringLiteral( "UID" ),
939  QStringLiteral( "UNDEFINED" ),
940  QStringLiteral( "UNDER" ),
941  QStringLiteral( "UNDO" ),
942  QStringLiteral( "UNION" ),
943  QStringLiteral( "UNIQUE" ),
944  QStringLiteral( "UNKNOWN" ),
945  QStringLiteral( "UNLOCK" ),
946  QStringLiteral( "UNNEST" ),
947  QStringLiteral( "UNPIVOT" ),
948  QStringLiteral( "UNSIGNED" ),
949  QStringLiteral( "UNTIL" ),
950  QStringLiteral( "UPD" ),
951  QStringLiteral( "UPDATE" ),
952  QStringLiteral( "UPDATETEXT" ),
953  QStringLiteral( "UPPER" ),
954  QStringLiteral( "UPPERCASE" ),
955  QStringLiteral( "USAGE" ),
956  QStringLiteral( "USE" ),
957  QStringLiteral( "USER" ),
958  QStringLiteral( "USING" ),
959  QStringLiteral( "UTC_DATE" ),
960  QStringLiteral( "UTC_TIME" ),
961  QStringLiteral( "UTC_TIMESTAMP" ),
962  QStringLiteral( "VALIDATE" ),
963  QStringLiteral( "VALIDPROC" ),
964  QStringLiteral( "VALUE" ),
965  QStringLiteral( "VALUE_OF" ),
966  QStringLiteral( "VALUES" ),
967  QStringLiteral( "VARBINARY" ),
968  QStringLiteral( "VARBYTE" ),
969  QStringLiteral( "VARCHAR" ),
970  QStringLiteral( "VARCHAR2" ),
971  QStringLiteral( "VARCHARACTER" ),
972  QStringLiteral( "VARGRAPHIC" ),
973  QStringLiteral( "VARIABLE" ),
974  QStringLiteral( "VARIADIC" ),
975  QStringLiteral( "VARIANT" ),
976  QStringLiteral( "VAR_POP" ),
977  QStringLiteral( "VAR_SAMP" ),
978  QStringLiteral( "VARYING" ),
979  QStringLiteral( "VCAT" ),
980  QStringLiteral( "VERBOSE" ),
981  QStringLiteral( "VERSIONING" ),
982  QStringLiteral( "VIEW" ),
983  QStringLiteral( "VIRTUAL" ),
984  QStringLiteral( "VOLATILE" ),
985  QStringLiteral( "VOLUMES" ),
986  QStringLiteral( "WAIT" ),
987  QStringLiteral( "WAITFOR" ),
988  QStringLiteral( "WHEN" ),
989  QStringLiteral( "WHENEVER" ),
990  QStringLiteral( "WHERE" ),
991  QStringLiteral( "WHILE" ),
992  QStringLiteral( "WIDTH_BUCKET" ),
993  QStringLiteral( "WINDOW" ),
994  QStringLiteral( "WITH" ),
995  QStringLiteral( "WITHIN" ),
996  QStringLiteral( "WITHIN_GROUP" ),
997  QStringLiteral( "WITHOUT" ),
998  QStringLiteral( "WLM" ),
999  QStringLiteral( "WORK" ),
1000  QStringLiteral( "WRITE" ),
1001  QStringLiteral( "WRITETEXT" ),
1002  QStringLiteral( "XMLCAST" ),
1003  QStringLiteral( "XMLEXISTS" ),
1004  QStringLiteral( "XMLNAMESPACES" ),
1005  QStringLiteral( "XOR" ),
1006  QStringLiteral( "YEAR" ),
1007  QStringLiteral( "YEAR_MONTH" ),
1008  QStringLiteral( "YEARS" ),
1009  QStringLiteral( "ZEROFILL" ),
1010  QStringLiteral( "ZEROIFNULL" ),
1011  QStringLiteral( "ZONE" ),
1012  }
1013  }
1014  };
1015 }
1016 
1018  const QString &name,
1019  const QgsFields &fields,
1020  QgsWkbTypes::Type wkbType,
1021  const QgsCoordinateReferenceSystem &srs,
1022  bool overwrite,
1023  const QMap<QString, QVariant> *
1024  options ) const
1025 {
1026  Q_UNUSED( schema );
1027  Q_UNUSED( name );
1028  Q_UNUSED( fields );
1029  Q_UNUSED( srs );
1030  Q_UNUSED( overwrite );
1031  Q_UNUSED( options );
1032  Q_UNUSED( wkbType );
1033  throw QgsProviderConnectionException( QObject::tr( "Operation 'createVectorTable' is not supported" ) );
1034 }
1035 
1036 void QgsAbstractDatabaseProviderConnection::renameVectorTable( const QString &, const QString &, const QString & ) const
1037 {
1038  checkCapability( Capability::RenameVectorTable );
1039 }
1040 
1041 
1043 {
1044  checkCapability( Capability::SqlLayers );
1045  return SqlVectorLayerOptions();
1046 }
1047 
1048 void QgsAbstractDatabaseProviderConnection::renameRasterTable( const QString &, const QString &, const QString & ) const
1049 {
1050  checkCapability( Capability::RenameRasterTable );
1051 }
1052 
1053 void QgsAbstractDatabaseProviderConnection::dropVectorTable( const QString &, const QString & ) const
1054 {
1055  checkCapability( Capability::DropVectorTable );
1056 }
1057 
1058 bool QgsAbstractDatabaseProviderConnection::tableExists( const QString &schema, const QString &name ) const
1059 {
1060  checkCapability( Capability::TableExists );
1061  const QList<QgsAbstractDatabaseProviderConnection::TableProperty> constTables { tables( schema ) };
1062  for ( const auto &t : constTables )
1063  {
1064  if ( t.tableName() == name )
1065  {
1066  return true;
1067  }
1068  }
1069  return false;
1070 }
1071 
1072 void QgsAbstractDatabaseProviderConnection::dropRasterTable( const QString &, const QString & ) const
1073 {
1074  checkCapability( Capability::DropRasterTable );
1075 }
1076 
1078 {
1079  checkCapability( Capability::CreateSchema );
1080 }
1081 
1082 void QgsAbstractDatabaseProviderConnection::dropSchema( const QString &, bool ) const
1083 {
1084  checkCapability( Capability::DropSchema );
1085 }
1086 
1087 void QgsAbstractDatabaseProviderConnection::renameSchema( const QString &, const QString & ) const
1088 {
1089  checkCapability( Capability::RenameSchema );
1090 }
1091 
1092 QList<QList<QVariant>> QgsAbstractDatabaseProviderConnection::executeSql( const QString &sql, QgsFeedback *feedback ) const
1093 {
1094  return execSql( sql, feedback ).rows();
1095 }
1096 
1097 
1099 {
1100  checkCapability( Capability::ExecuteSql );
1101  return QueryResult();
1102 }
1103 
1104 
1105 void QgsAbstractDatabaseProviderConnection::vacuum( const QString &, const QString & ) const
1106 {
1107  checkCapability( Capability::Vacuum );
1108 }
1109 
1111 {
1112  checkCapability( Capability::CreateSpatialIndex );
1113 }
1114 
1116 {
1117  checkCapability( Capability::SqlLayers );
1118  return nullptr;
1119 }
1120 
1121 void QgsAbstractDatabaseProviderConnection::deleteSpatialIndex( const QString &, const QString &, const QString & ) const
1122 {
1123  checkCapability( Capability::DeleteSpatialIndex );
1124 }
1125 
1126 bool QgsAbstractDatabaseProviderConnection::spatialIndexExists( const QString &, const QString &, const QString & ) const
1127 {
1128  checkCapability( Capability::SpatialIndexExists );
1129  return false;
1130 }
1131 
1132 void QgsAbstractDatabaseProviderConnection::deleteField( const QString &fieldName, const QString &schema, const QString &tableName, bool ) const
1133 {
1134  checkCapability( Capability::DeleteField );
1135 
1136  QgsVectorLayer::LayerOptions options { false, false };
1137  options.skipCrsValidation = true;
1138  std::unique_ptr<QgsVectorLayer> vl { std::make_unique<QgsVectorLayer>( tableUri( schema, tableName ), QStringLiteral( "temp_layer" ), mProviderKey, options ) };
1139  if ( ! vl->isValid() )
1140  {
1141  throw QgsProviderConnectionException( QObject::tr( "Could not create a vector layer for table '%1' in schema '%2'" )
1142  .arg( tableName, schema ) );
1143  }
1144  if ( vl->fields().lookupField( fieldName ) == -1 )
1145  {
1146  throw QgsProviderConnectionException( QObject::tr( "Could not find field '%1' in table '%2' in schema '%3'" )
1147  .arg( fieldName, tableName, schema ) );
1148 
1149  }
1150  if ( ! vl->dataProvider()->deleteAttributes( { vl->fields().lookupField( fieldName ) } ) )
1151  {
1152  throw QgsProviderConnectionException( QObject::tr( "Unknown error deleting field '%1' in table '%2' in schema '%3'" )
1153  .arg( fieldName, tableName, schema ) );
1154  }
1155 }
1156 
1157 void QgsAbstractDatabaseProviderConnection::addField( const QgsField &field, const QString &schema, const QString &tableName ) const
1158 {
1159  checkCapability( Capability::AddField );
1160 
1161  QgsVectorLayer::LayerOptions options { false, false };
1162  options.skipCrsValidation = true;
1163  std::unique_ptr<QgsVectorLayer> vl( std::make_unique<QgsVectorLayer>( tableUri( schema, tableName ), QStringLiteral( "temp_layer" ), mProviderKey, options ) );
1164  if ( ! vl->isValid() )
1165  {
1166  throw QgsProviderConnectionException( QObject::tr( "Could not create a vector layer for table '%1' in schema '%2'" )
1167  .arg( tableName, schema ) );
1168  }
1169  if ( vl->fields().lookupField( field.name() ) != -1 )
1170  {
1171  throw QgsProviderConnectionException( QObject::tr( "Field '%1' in table '%2' in schema '%3' already exists" )
1172  .arg( field.name(), tableName, schema ) );
1173 
1174  }
1175  if ( ! vl->dataProvider()->addAttributes( { field } ) )
1176  {
1177  throw QgsProviderConnectionException( QObject::tr( "Unknown error adding field '%1' in table '%2' in schema '%3'" )
1178  .arg( field.name(), tableName, schema ) );
1179  }
1180 }
1181 
1182 QList<QgsAbstractDatabaseProviderConnection::TableProperty> QgsAbstractDatabaseProviderConnection::tables( const QString &, const QgsAbstractDatabaseProviderConnection::TableFlags & ) const
1183 {
1184  checkCapability( Capability::Tables );
1185  return QList<QgsAbstractDatabaseProviderConnection::TableProperty>();
1186 }
1187 
1188 
1190 {
1191  checkCapability( Capability::Tables );
1192  const QList<QgsAbstractDatabaseProviderConnection::TableProperty> constTables { tables( schema ) };
1193  for ( const auto &t : constTables )
1194  {
1195  if ( t.tableName() == name )
1196  {
1197  return t;
1198  }
1199  }
1200  throw QgsProviderConnectionException( QObject::tr( "Table '%1' was not found in schema '%2'" )
1201  .arg( name, schema ) );
1202 }
1203 
1204 QList<QgsAbstractDatabaseProviderConnection::TableProperty> QgsAbstractDatabaseProviderConnection::tablesInt( const QString &schema, const int flags ) const
1205 {
1206  return tables( schema, static_cast<QgsAbstractDatabaseProviderConnection::TableFlags>( flags ) );
1207 }
1208 
1209 
1211 {
1212  checkCapability( Capability::Schemas );
1213  return QStringList();
1214 }
1215 
1217 {
1218  return mTableName;
1219 }
1220 
1222 {
1223  mTableName = name;
1224 }
1225 
1227 {
1228  // Do not add the type if it's already present
1230  for ( const auto &t : std::as_const( mGeometryColumnTypes ) )
1231  {
1232  if ( t == toAdd )
1233  {
1234  return;
1235  }
1236  }
1237  mGeometryColumnTypes.push_back( toAdd );
1238 }
1239 
1240 QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType> QgsAbstractDatabaseProviderConnection::TableProperty::geometryColumnTypes() const
1241 {
1242  return mGeometryColumnTypes;
1243 }
1244 
1245 
1246 QgsFields QgsAbstractDatabaseProviderConnection::fields( const QString &schema, const QString &tableName ) const
1247 {
1248  QgsVectorLayer::LayerOptions options { false, true };
1249  options.skipCrsValidation = true;
1250  QgsVectorLayer vl { tableUri( schema, tableName ), QStringLiteral( "temp_layer" ), mProviderKey, options };
1251  if ( vl.isValid() )
1252  {
1253  // Note: this implementation works for providers that do not hide any "special" field (geometry or PKs)
1254  return vl.fields();
1255  }
1256  else
1257  {
1258  throw QgsProviderConnectionException( QObject::tr( "Error retrieving fields information for uri: %1" ).arg( vl.publicSource() ) );
1259  }
1260 }
1261 
1263 {
1264  QString n = mTableName;
1265  if ( mGeometryColumnCount > 1 ) n += '.' + mGeometryColumn;
1266  return n;
1267 }
1268 
1270 {
1271  TableProperty property;
1272 
1273  Q_ASSERT( index >= 0 && index < mGeometryColumnTypes.size() );
1274 
1275  property.mGeometryColumnTypes << mGeometryColumnTypes[ index ];
1276  property.mSchema = mSchema;
1277  property.mTableName = mTableName;
1278  property.mGeometryColumn = mGeometryColumn;
1279  property.mPkColumns = mPkColumns;
1280  property.mGeometryColumnCount = mGeometryColumnCount;
1281  property.mFlags = mFlags;
1282  property.mComment = mComment;
1283  property.mInfo = mInfo;
1284  return property;
1285 }
1286 
1288 {
1289  mFlags.setFlag( flag );
1290 }
1291 
1293 {
1294  int res = 0;
1295  for ( const TableProperty::GeometryColumnType &ct : std::as_const( mGeometryColumnTypes ) )
1296  {
1297  res = std::max( res, QgsWkbTypes::coordDimensions( ct.wkbType ) );
1298  }
1299  return res;
1300 }
1301 
1303 {
1304  return mSchema == other.mSchema &&
1305  mTableName == other.mTableName &&
1306  mGeometryColumn == other.mGeometryColumn &&
1307  mGeometryColumnCount == other.mGeometryColumnCount &&
1308  mPkColumns == other.mPkColumns &&
1309  mFlags == other.mFlags &&
1310  mComment == other.mComment &&
1311  mInfo == other.mInfo;
1312 }
1313 
1314 
1315 void QgsAbstractDatabaseProviderConnection::TableProperty::setGeometryColumnTypes( const QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType> &columnTypes )
1316 {
1317  mGeometryColumnTypes = columnTypes;
1318 }
1319 
1320 
1322 {
1323  return mGeometryColumnCount;
1324 }
1325 
1327 {
1328  mGeometryColumnCount = geometryColumnCount;
1329 }
1330 
1332 {
1333  return mInfo;
1334 }
1335 
1337 {
1338  mInfo = info;
1339 }
1340 
1342 {
1343  return mComment;
1344 }
1345 
1347 {
1348  mComment = comment;
1349 }
1350 
1351 QgsAbstractDatabaseProviderConnection::TableFlags QgsAbstractDatabaseProviderConnection::TableProperty::flags() const
1352 {
1353  return mFlags;
1354 }
1355 
1356 void QgsAbstractDatabaseProviderConnection::TableProperty::setFlags( const QgsAbstractDatabaseProviderConnection::TableFlags &flags )
1357 {
1358  mFlags = flags;
1359 }
1360 
1361 QList<QgsCoordinateReferenceSystem> QgsAbstractDatabaseProviderConnection::TableProperty::crsList() const
1362 {
1363  QList<QgsCoordinateReferenceSystem> crss;
1364  for ( const auto &t : std::as_const( mGeometryColumnTypes ) )
1365  {
1366  crss.push_back( t.crs );
1367  }
1368  return crss;
1369 }
1370 
1372 {
1373  return mPkColumns;
1374 }
1375 
1377 {
1378  mPkColumns = pkColumns;
1379 }
1380 
1382 {
1383  return mGeometryColumn;
1384 }
1385 
1387 {
1388  mGeometryColumn = geometryColumn;
1389 }
1390 
1392 {
1393  return mSchema;
1394 }
1395 
1397 {
1398  mSchema = schema;
1399 }
1400 
1401 
1403 
1405 {
1406  return mColumns;
1407 }
1408 
1409 QList<QList<QVariant> > QgsAbstractDatabaseProviderConnection::QueryResult::rows( QgsFeedback *feedback )
1410 {
1411 
1412  QList<QList<QVariant> > rows;
1413 
1414  while ( mResultIterator &&
1415  mResultIterator->hasNextRow() &&
1416  ( ! feedback || ! feedback->isCanceled() ) )
1417  {
1418  const QVariantList row( mResultIterator->nextRow() );
1419  if ( row.isEmpty() )
1420  {
1421  break;
1422  }
1423  else
1424  {
1425  rows.push_back( row );
1426  }
1427  }
1428  return rows;
1429 }
1430 
1432 {
1433  if ( ! mResultIterator )
1434  {
1435  return QList<QVariant>();
1436  }
1437  return mResultIterator->nextRow();
1438 }
1439 
1440 
1442 {
1443  if ( ! mResultIterator )
1444  {
1445  return 0;
1446  }
1447  return mResultIterator->fetchedRowCount();
1448 }
1449 
1451 {
1452  if ( ! mResultIterator )
1453  {
1454  return static_cast<long long>( Qgis::FeatureCountState::UnknownCount );
1455  }
1456  return mResultIterator->rowCount();
1457 }
1458 
1459 
1461 {
1462  if ( ! mResultIterator )
1463  {
1464  return false;
1465  }
1466  return mResultIterator->hasNextRow();
1467 }
1468 
1469 void QgsAbstractDatabaseProviderConnection::QueryResult::appendColumn( const QString &columnName )
1470 {
1471  mColumns.push_back( columnName );
1472 }
1473 
1474 
1475 QgsAbstractDatabaseProviderConnection::QueryResult::QueryResult( std::shared_ptr<QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator> iterator )
1476  : mResultIterator( iterator )
1477 {}
1478 
1479 double QgsAbstractDatabaseProviderConnection::QueryResult::queryExecutionTime()
1480 {
1481  return mQueryExecutionTime;
1482 }
1483 
1484 void QgsAbstractDatabaseProviderConnection::QueryResult::setQueryExecutionTime( double queryExecutionTime )
1485 {
1486  mQueryExecutionTime = queryExecutionTime;
1487 }
1488 
1489 
1490 QVariantList QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator::nextRow()
1491 {
1492  QMutexLocker lock( &mMutex );
1493  const QVariantList row = nextRowPrivate();
1494  if ( ! row.isEmpty() )
1495  {
1496  mFetchedRowCount++;
1497  }
1498  return row;
1499 }
1500 
1501 bool QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator::hasNextRow() const
1502 {
1503  QMutexLocker lock( &mMutex );
1504  return hasNextRowPrivate();
1505 }
1506 
1507 long long QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator::fetchedRowCount()
1508 {
1509  QMutexLocker lock( &mMutex );
1510  return mFetchedRowCount;
1511 }
1512 
1513 long long QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator::rowCount()
1514 {
1515  QMutexLocker lock( &mMutex );
1516  return rowCountPrivate();
1517 }
1518 
1520 
@ Constant
SQL constant.
virtual void vacuum(const QString &schema, const QString &name) const SIP_THROW(QgsProviderConnectionException)
Vacuum the database table with given schema and name (schema is ignored if not supported by the backe...
Qgis::SqlLayerDefinitionCapabilities mSqlLayerDefinitionCapabilities
virtual QueryResult execSql(const QString &sql, QgsFeedback *feedback=nullptr) const SIP_THROW(QgsProviderConnectionException)
Executes raw sql and returns the (possibly empty) query results, optionally feedback can be provided.
virtual QgsVectorLayer * createSqlVectorLayer(const SqlVectorLayerOptions &options) const SIP_THROW(QgsProviderConnectionException)
Creates and returns a (possibly invalid) vector layer based on the sql statement and optional options...
virtual SqlVectorLayerOptions sqlOptions(const QString &layerSource) SIP_THROW(QgsProviderConnectionException)
Returns the SQL layer options from a layerSource.
QString providerKey() const
Returns the provider key.
virtual bool tableExists(const QString &schema, const QString &name) const SIP_THROW(QgsProviderConnectionException)
Checks whether a table name exists in the given schema.
virtual void createVectorTable(const QString &schema, const QString &name, const QgsFields &fields, QgsWkbTypes::Type wkbType, const QgsCoordinateReferenceSystem &srs, bool overwrite, const QMap< QString, QVariant > *options) const SIP_THROW(QgsProviderConnectionException)
Creates an empty table with name in the given schema (schema is ignored if not supported by the backe...
virtual void deleteSpatialIndex(const QString &schema, const QString &name, const QString &geometryColumn) const SIP_THROW(QgsProviderConnectionException)
Deletes the existing spatial index for the database table with given schema, name and geometryColumn ...
Capability
The Capability enum represents the operations supported by the connection.
virtual void deleteField(const QString &fieldName, const QString &schema, const QString &tableName, bool force=false) const SIP_THROW(QgsProviderConnectionException)
Deletes the field with the specified name.
virtual void createSchema(const QString &name) const SIP_THROW(QgsProviderConnectionException)
Creates a new schema with the specified name.
virtual GeometryColumnCapabilities geometryColumnCapabilities()
Returns connection geometry column capabilities (Z, M, SinglePart, Curves).
virtual void dropSchema(const QString &name, bool force=false) const SIP_THROW(QgsProviderConnectionException)
Drops an entire schema with the specified name.
virtual Qgis::SqlLayerDefinitionCapabilities sqlLayerDefinitionCapabilities()
Returns SQL layer definition capabilities (Filters, GeometryColumn, PrimaryKeys).
virtual void addField(const QgsField &field, const QString &schema, const QString &tableName) const SIP_THROW(QgsProviderConnectionException)
Adds a field.
virtual QList< QList< QVariant > > executeSql(const QString &sql, QgsFeedback *feedback=nullptr) const SIP_THROW(QgsProviderConnectionException)
Executes raw sql and returns the (possibly empty) list of results in a multi-dimensional array,...
virtual void renameRasterTable(const QString &schema, const QString &name, const QString &newName) const SIP_THROW(QgsProviderConnectionException)
Renames a raster table with given schema (schema is ignored if not supported by the backend) and name...
QList< QgsAbstractDatabaseProviderConnection::TableProperty > tablesInt(const QString &schema=QString(), const int flags=0) const SIP_THROW(QgsProviderConnectionException)
Returns information on the tables in the given schema.
virtual void renameVectorTable(const QString &schema, const QString &name, const QString &newName) const SIP_THROW(QgsProviderConnectionException)
Renames a vector or aspatial table with given schema (schema is ignored if not supported by the backe...
virtual bool spatialIndexExists(const QString &schema, const QString &name, const QString &geometryColumn) const SIP_THROW(QgsProviderConnectionException)
Determines whether a spatial index exists for the database table with given schema,...
virtual void renameSchema(const QString &name, const QString &newName) const SIP_THROW(QgsProviderConnectionException)
Renames a schema with the specified name.
virtual QMultiMap< Qgis::SqlKeywordCategory, QStringList > sqlDictionary()
Returns a dictionary of SQL keywords supported by the provider.
virtual QgsAbstractDatabaseProviderConnection::TableProperty table(const QString &schema, const QString &table) const SIP_THROW(QgsProviderConnectionException)
Returns information on a table in the given schema.
virtual QStringList schemas() const SIP_THROW(QgsProviderConnectionException)
Returns information about the existing schemas.
virtual QString tableUri(const QString &schema, const QString &name) const SIP_THROW(QgsProviderConnectionException)
Returns the URI string for the given table and schema.
virtual QgsFields fields(const QString &schema, const QString &table) const SIP_THROW(QgsProviderConnectionException)
Returns the fields of a table and schema.
virtual void createSpatialIndex(const QString &schema, const QString &name, const QgsAbstractDatabaseProviderConnection::SpatialIndexOptions &options=QgsAbstractDatabaseProviderConnection::SpatialIndexOptions()) const SIP_THROW(QgsProviderConnectionException)
Creates a spatial index for the database table with given schema and name (schema is ignored if not s...
virtual void dropVectorTable(const QString &schema, const QString &name) const SIP_THROW(QgsProviderConnectionException)
Drops a vector (or aspatial) table with given schema (schema is ignored if not supported by the backe...
QgsAbstractDatabaseProviderConnection(const QString &name)
Creates a new connection with name by reading its configuration from the settings.
virtual void dropRasterTable(const QString &schema, const QString &name) const SIP_THROW(QgsProviderConnectionException)
Drops a raster table with given schema (schema is ignored if not supported by the backend) and name.
virtual QList< QgsAbstractDatabaseProviderConnection::TableProperty > tables(const QString &schema=QString(), const QgsAbstractDatabaseProviderConnection::TableFlags &flags=QgsAbstractDatabaseProviderConnection::TableFlags()) const
Returns information on the tables in the given schema.
Capabilities capabilities() const
Returns connection capabilities.
The QgsAbstractProviderConnection provides an interface for data provider connections.
This class represents a coordinate reference system (CRS).
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:45
bool isCanceled() const SIP_HOLDGIL
Tells whether the operation has been canceled already.
Definition: qgsfeedback.h:54
Encapsulate a field in an attribute table or data source.
Definition: qgsfield.h:51
QString name
Definition: qgsfield.h:60
Container of fields for a vector layer.
Definition: qgsfields.h:45
Custom exception class for provider connection related exceptions.
Definition: qgsexception.h:101
Represents a vector layer which manages a vector based data sets.
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:70
static int coordDimensions(Type type) SIP_HOLDGIL
Returns the coordinate dimension of the geometry type as an integer.
Definition: qgswkbtypes.h:955
@ UnknownCount
Provider returned an unknown feature count.
const QgsField & field
Definition: qgsfield.h:463
const QgsCoordinateReferenceSystem & crs
The QueryResult class represents the result of a query executed by execSql()
QList< QList< QVariant > > rows(QgsFeedback *feedback=nullptr)
Returns the result rows by calling the iterator internally and fetching all the rows,...
long long fetchedRowCount() const
Returns the number of fetched rows.
bool hasNextRow() const
Returns true if there are more rows to fetch.
long long rowCount() const
Returns the number of rows returned by a SELECT query or Qgis::FeatureCountState::UnknownCount if unk...
QList< QVariant > nextRow() const
Returns the next result row or an empty row if there are no rows left.
QStringList columns() const
Returns the column names.
The SpatialIndexOptions contains extra options relating to spatial index creation.
The SqlVectorLayerOptions stores all information required to create a SQL (query) layer.
The GeometryColumnType struct represents the combination of geometry type and CRS for the table geome...
The TableProperty class represents a database table or view.
void setTableName(const QString &name)
Sets the table name to name.
void addGeometryColumnType(const QgsWkbTypes::Type &type, const QgsCoordinateReferenceSystem &crs)
Appends the geometry column type with the given srid to the geometry column types list.
bool operator==(const QgsAbstractDatabaseProviderConnection::TableProperty &other) const
void setPrimaryKeyColumns(const QStringList &primaryKeyColumns)
Sets the primary key column names to primaryKeyColumns.
QString defaultName() const
Returns the default name for the table entry.
QList< QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType > geometryColumnTypes() const
Returns the list of geometry column types and CRSs.
void setGeometryColumn(const QString &geometryColumn)
Sets the geometry column name to geometryColumn.
TableProperty at(int index) const
Returns the table property corresponding to the geometry type at the given index.
int maxCoordinateDimensions() const
Returns the maximum coordinate dimensions of the geometries of a vector table.
int geometryColumnCount() const
Returns the number of geometry columns in the original table this entry refers to.
QList< QgsCoordinateReferenceSystem > crsList() const
Returns the list of CRSs supported by the geometry column.
QVariantMap info() const
Returns additional information about the table.
void setInfo(const QVariantMap &info)
Sets additional information about the table to info.
QStringList primaryKeyColumns() const
Returns the list of primary key column names.
void setGeometryColumnTypes(const QList< QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType > &geometryColumnTypes)
Sets the geometry column types to geometryColumnTypes.
void setComment(const QString &comment)
Sets the table comment.
QString schema() const
Returns the schema or an empty string for backends that do not support a schema.
void setGeometryColumnCount(int geometryColumnCount)
Sets the geometryColumnCount.
Setting options for loading vector layers.
bool skipCrsValidation
Controls whether the layer is allowed to have an invalid/unknown CRS.