17#include "moc_qgsabstractdatabaseproviderconnection.cpp" 
   77    static QMetaEnum metaEnum = QMetaEnum::fromType<QgsAbstractDatabaseProviderConnection::Capability>();
 
   78    const QString capName { metaEnum.valueToKey( capability ) };
 
   91QString QgsAbstractDatabaseProviderConnection::sanitizeSqlForQueryLayer( 
const QString &sql )
 const 
   93  QString sanitizedSql { sql.trimmed() };
 
   94  while ( sanitizedSql.endsWith( 
';' ) )
 
   96    sanitizedSql.chop( 1 );
 
  115        QStringLiteral( 
"NULL" ),
 
  116        QStringLiteral( 
"FALSE" ),
 
  117        QStringLiteral( 
"TRUE" ),
 
  125        QStringLiteral( 
"ABORT " ),
 
  126        QStringLiteral( 
"ABORTSESSION" ),
 
  127        QStringLiteral( 
"ABS" ),
 
  128        QStringLiteral( 
"ABSOLUTE" ),
 
  129        QStringLiteral( 
"ACCESS" ),
 
  130        QStringLiteral( 
"ACCESSIBLE" ),
 
  131        QStringLiteral( 
"ACCESS_LOCK" ),
 
  132        QStringLiteral( 
"ACCOUNT" ),
 
  133        QStringLiteral( 
"ACOS" ),
 
  134        QStringLiteral( 
"ACOSH" ),
 
  135        QStringLiteral( 
"ACTION" ),
 
  136        QStringLiteral( 
"ADD" ),
 
  137        QStringLiteral( 
"ADD_MONTHS" ),
 
  138        QStringLiteral( 
"ADMIN" ),
 
  139        QStringLiteral( 
"AFTER" ),
 
  140        QStringLiteral( 
"AGGREGATE" ),
 
  141        QStringLiteral( 
"ALIAS" ),
 
  142        QStringLiteral( 
"ALL" ),
 
  143        QStringLiteral( 
"ALLOCATE" ),
 
  144        QStringLiteral( 
"ALLOW" ),
 
  145        QStringLiteral( 
"ALTER" ),
 
  146        QStringLiteral( 
"ALTERAND" ),
 
  147        QStringLiteral( 
"AMP" ),
 
  148        QStringLiteral( 
"ANALYSE" ),
 
  149        QStringLiteral( 
"ANALYZE" ),
 
  150        QStringLiteral( 
"AND" ),
 
  151        QStringLiteral( 
"ANSIDATE" ),
 
  152        QStringLiteral( 
"ANY" ),
 
  153        QStringLiteral( 
"ARE" ),
 
  154        QStringLiteral( 
"ARRAY" ),
 
  155        QStringLiteral( 
"ARRAY_AGG" ),
 
  156        QStringLiteral( 
"ARRAY_EXISTS" ),
 
  157        QStringLiteral( 
"ARRAY_MAX_CARDINALITY" ),
 
  158        QStringLiteral( 
"AS" ),
 
  159        QStringLiteral( 
"ASC" ),
 
  160        QStringLiteral( 
"ASENSITIVE" ),
 
  161        QStringLiteral( 
"ASIN" ),
 
  162        QStringLiteral( 
"ASINH" ),
 
  163        QStringLiteral( 
"ASSERTION" ),
 
  164        QStringLiteral( 
"ASSOCIATE" ),
 
  165        QStringLiteral( 
"ASUTIME" ),
 
  166        QStringLiteral( 
"ASYMMETRIC" ),
 
  167        QStringLiteral( 
"AT" ),
 
  168        QStringLiteral( 
"ATAN" ),
 
  169        QStringLiteral( 
"ATAN2" ),
 
  170        QStringLiteral( 
"ATANH" ),
 
  171        QStringLiteral( 
"ATOMIC" ),
 
  172        QStringLiteral( 
"AUDIT" ),
 
  173        QStringLiteral( 
"AUTHORIZATION" ),
 
  174        QStringLiteral( 
"AUX" ),
 
  175        QStringLiteral( 
"AUXILIARY" ),
 
  176        QStringLiteral( 
"AVE" ),
 
  177        QStringLiteral( 
"AVERAGE" ),
 
  178        QStringLiteral( 
"AVG" ),
 
  179        QStringLiteral( 
"BACKUP" ),
 
  180        QStringLiteral( 
"BEFORE" ),
 
  181        QStringLiteral( 
"BEGIN" ),
 
  182        QStringLiteral( 
"BEGIN_FRAME" ),
 
  183        QStringLiteral( 
"BEGIN_PARTITION" ),
 
  184        QStringLiteral( 
"BETWEEN" ),
 
  185        QStringLiteral( 
"BIGINT" ),
 
  186        QStringLiteral( 
"BINARY" ),
 
  187        QStringLiteral( 
"BIT" ),
 
  188        QStringLiteral( 
"BLOB" ),
 
  189        QStringLiteral( 
"BOOLEAN" ),
 
  190        QStringLiteral( 
"BOTH" ),
 
  191        QStringLiteral( 
"BREADTH" ),
 
  192        QStringLiteral( 
"BREAK" ),
 
  193        QStringLiteral( 
"BROWSE" ),
 
  194        QStringLiteral( 
"BT" ),
 
  195        QStringLiteral( 
"BUFFERPOOL" ),
 
  196        QStringLiteral( 
"BULK" ),
 
  197        QStringLiteral( 
"BUT" ),
 
  198        QStringLiteral( 
"BY" ),
 
  199        QStringLiteral( 
"BYTE" ),
 
  200        QStringLiteral( 
"BYTEINT" ),
 
  201        QStringLiteral( 
"BYTES" ),
 
  202        QStringLiteral( 
"CALL" ),
 
  203        QStringLiteral( 
"CALLED" ),
 
  204        QStringLiteral( 
"CAPTURE" ),
 
  205        QStringLiteral( 
"CARDINALITY" ),
 
  206        QStringLiteral( 
"CASCADE" ),
 
  207        QStringLiteral( 
"CASCADED" ),
 
  208        QStringLiteral( 
"CASE" ),
 
  209        QStringLiteral( 
"CASE_N" ),
 
  210        QStringLiteral( 
"CASESPECIFIC" ),
 
  211        QStringLiteral( 
"CAST" ),
 
  212        QStringLiteral( 
"CATALOG" ),
 
  213        QStringLiteral( 
"CCSID" ),
 
  214        QStringLiteral( 
"CD" ),
 
  215        QStringLiteral( 
"CEIL" ),
 
  216        QStringLiteral( 
"CEILING" ),
 
  217        QStringLiteral( 
"CHANGE" ),
 
  218        QStringLiteral( 
"CHAR" ),
 
  219        QStringLiteral( 
"CHAR2HEXINT" ),
 
  220        QStringLiteral( 
"CHARACTER" ),
 
  221        QStringLiteral( 
"CHARACTER_LENGTH" ),
 
  222        QStringLiteral( 
"CHARACTERS" ),
 
  223        QStringLiteral( 
"CHAR_LENGTH" ),
 
  224        QStringLiteral( 
"CHARS" ),
 
  225        QStringLiteral( 
"CHECK" ),
 
  226        QStringLiteral( 
"CHECKPOINT" ),
 
  227        QStringLiteral( 
"CLASS" ),
 
  228        QStringLiteral( 
"CLASSIFIER" ),
 
  229        QStringLiteral( 
"CLOB" ),
 
  230        QStringLiteral( 
"CLONE" ),
 
  231        QStringLiteral( 
"CLOSE" ),
 
  232        QStringLiteral( 
"CLUSTER" ),
 
  233        QStringLiteral( 
"CLUSTERED" ),
 
  234        QStringLiteral( 
"CM" ),
 
  235        QStringLiteral( 
"COALESCE" ),
 
  236        QStringLiteral( 
"COLLATE" ),
 
  237        QStringLiteral( 
"COLLATION" ),
 
  238        QStringLiteral( 
"COLLECT" ),
 
  239        QStringLiteral( 
"COLLECTION" ),
 
  240        QStringLiteral( 
"COLLID" ),
 
  241        QStringLiteral( 
"COLUMN" ),
 
  242        QStringLiteral( 
"COLUMN_VALUE" ),
 
  243        QStringLiteral( 
"COMMENT" ),
 
  244        QStringLiteral( 
"COMMIT" ),
 
  245        QStringLiteral( 
"COMPLETION" ),
 
  246        QStringLiteral( 
"COMPRESS" ),
 
  247        QStringLiteral( 
"COMPUTE" ),
 
  248        QStringLiteral( 
"CONCAT" ),
 
  249        QStringLiteral( 
"CONCURRENTLY" ),
 
  250        QStringLiteral( 
"CONDITION" ),
 
  251        QStringLiteral( 
"CONNECT" ),
 
  252        QStringLiteral( 
"CONNECTION" ),
 
  253        QStringLiteral( 
"CONSTRAINT" ),
 
  254        QStringLiteral( 
"CONSTRAINTS" ),
 
  255        QStringLiteral( 
"CONSTRUCTOR" ),
 
  256        QStringLiteral( 
"CONTAINS" ),
 
  257        QStringLiteral( 
"CONTAINSTABLE" ),
 
  258        QStringLiteral( 
"CONTENT" ),
 
  259        QStringLiteral( 
"CONTINUE" ),
 
  260        QStringLiteral( 
"CONVERT" ),
 
  261        QStringLiteral( 
"CONVERT_TABLE_HEADER" ),
 
  262        QStringLiteral( 
"COPY" ),
 
  263        QStringLiteral( 
"CORR" ),
 
  264        QStringLiteral( 
"CORRESPONDING" ),
 
  265        QStringLiteral( 
"COS" ),
 
  266        QStringLiteral( 
"COSH" ),
 
  267        QStringLiteral( 
"COUNT" ),
 
  268        QStringLiteral( 
"COVAR_POP" ),
 
  269        QStringLiteral( 
"COVAR_SAMP" ),
 
  270        QStringLiteral( 
"CREATE" ),
 
  271        QStringLiteral( 
"CROSS" ),
 
  272        QStringLiteral( 
"CS" ),
 
  273        QStringLiteral( 
"CSUM" ),
 
  274        QStringLiteral( 
"CT" ),
 
  275        QStringLiteral( 
"CUBE" ),
 
  276        QStringLiteral( 
"CUME_DIST" ),
 
  277        QStringLiteral( 
"CURRENT" ),
 
  278        QStringLiteral( 
"CURRENT_CATALOG" ),
 
  279        QStringLiteral( 
"CURRENT_DATE" ),
 
  280        QStringLiteral( 
"CURRENT_DEFAULT_TRANSFORM_GROUP" ),
 
  281        QStringLiteral( 
"CURRENT_LC_CTYPE" ),
 
  282        QStringLiteral( 
"CURRENT_PATH" ),
 
  283        QStringLiteral( 
"CURRENT_ROLE" ),
 
  284        QStringLiteral( 
"CURRENT_ROW" ),
 
  285        QStringLiteral( 
"CURRENT_SCHEMA" ),
 
  286        QStringLiteral( 
"CURRENT_SERVER" ),
 
  287        QStringLiteral( 
"CURRENT_TIME" ),
 
  288        QStringLiteral( 
"CURRENT_TIMESTAMP" ),
 
  289        QStringLiteral( 
"CURRENT_TIMEZONE" ),
 
  290        QStringLiteral( 
"CURRENT_TRANSFORM_GROUP_FOR_TYPE" ),
 
  291        QStringLiteral( 
"CURRENT_USER" ),
 
  292        QStringLiteral( 
"CURRVAL" ),
 
  293        QStringLiteral( 
"CURSOR" ),
 
  294        QStringLiteral( 
"CV" ),
 
  295        QStringLiteral( 
"CYCLE" ),
 
  296        QStringLiteral( 
"DATA" ),
 
  297        QStringLiteral( 
"DATABASE" ),
 
  298        QStringLiteral( 
"DATABASES" ),
 
  299        QStringLiteral( 
"DATABLOCKSIZE" ),
 
  300        QStringLiteral( 
"DATE" ),
 
  301        QStringLiteral( 
"DATEFORM" ),
 
  302        QStringLiteral( 
"DAY" ),
 
  303        QStringLiteral( 
"DAY_HOUR" ),
 
  304        QStringLiteral( 
"DAY_MICROSECOND" ),
 
  305        QStringLiteral( 
"DAY_MINUTE" ),
 
  306        QStringLiteral( 
"DAYS" ),
 
  307        QStringLiteral( 
"DAY_SECOND" ),
 
  308        QStringLiteral( 
"DBCC" ),
 
  309        QStringLiteral( 
"DBINFO" ),
 
  310        QStringLiteral( 
"DEALLOCATE" ),
 
  311        QStringLiteral( 
"DEC" ),
 
  312        QStringLiteral( 
"DECFLOAT" ),
 
  313        QStringLiteral( 
"DECIMAL" ),
 
  314        QStringLiteral( 
"DECLARE" ),
 
  315        QStringLiteral( 
"DEFAULT" ),
 
  316        QStringLiteral( 
"DEFERRABLE" ),
 
  317        QStringLiteral( 
"DEFERRED" ),
 
  318        QStringLiteral( 
"DEFINE" ),
 
  319        QStringLiteral( 
"DEGREES" ),
 
  320        QStringLiteral( 
"DEL" ),
 
  321        QStringLiteral( 
"DELAYED" ),
 
  322        QStringLiteral( 
"DELETE" ),
 
  323        QStringLiteral( 
"DENSE_RANK" ),
 
  324        QStringLiteral( 
"DENY" ),
 
  325        QStringLiteral( 
"DEPTH" ),
 
  326        QStringLiteral( 
"DEREF" ),
 
  327        QStringLiteral( 
"DESC" ),
 
  328        QStringLiteral( 
"DESCRIBE" ),
 
  329        QStringLiteral( 
"DESCRIPTOR" ),
 
  330        QStringLiteral( 
"DESTROY" ),
 
  331        QStringLiteral( 
"DESTRUCTOR" ),
 
  332        QStringLiteral( 
"DETERMINISTIC" ),
 
  333        QStringLiteral( 
"DIAGNOSTIC" ),
 
  334        QStringLiteral( 
"DIAGNOSTICS" ),
 
  335        QStringLiteral( 
"DICTIONARY" ),
 
  336        QStringLiteral( 
"DISABLE" ),
 
  337        QStringLiteral( 
"DISABLED" ),
 
  338        QStringLiteral( 
"DISALLOW" ),
 
  339        QStringLiteral( 
"DISCONNECT" ),
 
  340        QStringLiteral( 
"DISK" ),
 
  341        QStringLiteral( 
"DISTINCT" ),
 
  342        QStringLiteral( 
"DISTINCTROW" ),
 
  343        QStringLiteral( 
"DISTRIBUTED" ),
 
  344        QStringLiteral( 
"DIV" ),
 
  345        QStringLiteral( 
"DO" ),
 
  346        QStringLiteral( 
"DOCUMENT" ),
 
  347        QStringLiteral( 
"DOMAIN" ),
 
  348        QStringLiteral( 
"DOUBLE" ),
 
  349        QStringLiteral( 
"DROP" ),
 
  350        QStringLiteral( 
"DSSIZE" ),
 
  351        QStringLiteral( 
"DUAL" ),
 
  352        QStringLiteral( 
"DUMP" ),
 
  353        QStringLiteral( 
"DYNAMIC" ),
 
  354        QStringLiteral( 
"EACH" ),
 
  355        QStringLiteral( 
"ECHO" ),
 
  356        QStringLiteral( 
"EDITPROC" ),
 
  357        QStringLiteral( 
"ELEMENT" ),
 
  358        QStringLiteral( 
"ELSE" ),
 
  359        QStringLiteral( 
"ELSEIF" ),
 
  360        QStringLiteral( 
"EMPTY" ),
 
  361        QStringLiteral( 
"ENABLED" ),
 
  362        QStringLiteral( 
"ENCLOSED" ),
 
  363        QStringLiteral( 
"ENCODING" ),
 
  364        QStringLiteral( 
"ENCRYPTION" ),
 
  365        QStringLiteral( 
"END" ),
 
  366        QStringLiteral( 
"END-EXEC" ),
 
  367        QStringLiteral( 
"END_FRAME" ),
 
  368        QStringLiteral( 
"ENDING" ),
 
  369        QStringLiteral( 
"END_PARTITION" ),
 
  370        QStringLiteral( 
"EQ" ),
 
  371        QStringLiteral( 
"EQUALS" ),
 
  372        QStringLiteral( 
"ERASE" ),
 
  373        QStringLiteral( 
"ERRLVL" ),
 
  374        QStringLiteral( 
"ERROR" ),
 
  375        QStringLiteral( 
"ERRORFILES" ),
 
  376        QStringLiteral( 
"ERRORTABLES" ),
 
  377        QStringLiteral( 
"ESCAPE" ),
 
  378        QStringLiteral( 
"ESCAPED" ),
 
  379        QStringLiteral( 
"ET" ),
 
  380        QStringLiteral( 
"EVERY" ),
 
  381        QStringLiteral( 
"EXCEPT" ),
 
  382        QStringLiteral( 
"EXCEPTION" ),
 
  383        QStringLiteral( 
"EXCLUSIVE" ),
 
  384        QStringLiteral( 
"EXEC" ),
 
  385        QStringLiteral( 
"EXECUTE" ),
 
  386        QStringLiteral( 
"EXISTS" ),
 
  387        QStringLiteral( 
"EXIT" ),
 
  388        QStringLiteral( 
"EXP" ),
 
  389        QStringLiteral( 
"EXPLAIN" ),
 
  390        QStringLiteral( 
"EXTERNAL" ),
 
  391        QStringLiteral( 
"EXTRACT" ),
 
  392        QStringLiteral( 
"FALLBACK" ),
 
  393        QStringLiteral( 
"FALSE" ),
 
  394        QStringLiteral( 
"FASTEXPORT" ),
 
  395        QStringLiteral( 
"FENCED" ),
 
  396        QStringLiteral( 
"FETCH" ),
 
  397        QStringLiteral( 
"FIELDPROC" ),
 
  398        QStringLiteral( 
"FILE" ),
 
  399        QStringLiteral( 
"FILLFACTOR" ),
 
  400        QStringLiteral( 
"FILTER" ),
 
  401        QStringLiteral( 
"FINAL" ),
 
  402        QStringLiteral( 
"FIRST" ),
 
  403        QStringLiteral( 
"FIRST_VALUE" ),
 
  404        QStringLiteral( 
"FLOAT" ),
 
  405        QStringLiteral( 
"FLOAT4" ),
 
  406        QStringLiteral( 
"FLOAT8" ),
 
  407        QStringLiteral( 
"FLOOR" ),
 
  408        QStringLiteral( 
"FOR" ),
 
  409        QStringLiteral( 
"FORCE" ),
 
  410        QStringLiteral( 
"FOREIGN" ),
 
  411        QStringLiteral( 
"FORMAT" ),
 
  412        QStringLiteral( 
"FOUND" ),
 
  413        QStringLiteral( 
"FRAME_ROW" ),
 
  414        QStringLiteral( 
"FREE" ),
 
  415        QStringLiteral( 
"FREESPACE" ),
 
  416        QStringLiteral( 
"FREETEXT" ),
 
  417        QStringLiteral( 
"FREETEXTTABLE" ),
 
  418        QStringLiteral( 
"FREEZE" ),
 
  419        QStringLiteral( 
"FROM" ),
 
  420        QStringLiteral( 
"FULL" ),
 
  421        QStringLiteral( 
"FULLTEXT" ),
 
  422        QStringLiteral( 
"FUNCTION" ),
 
  423        QStringLiteral( 
"FUSION" ),
 
  424        QStringLiteral( 
"GE" ),
 
  425        QStringLiteral( 
"GENERAL" ),
 
  426        QStringLiteral( 
"GENERATED" ),
 
  427        QStringLiteral( 
"GET" ),
 
  428        QStringLiteral( 
"GIVE" ),
 
  429        QStringLiteral( 
"GLOBAL" ),
 
  430        QStringLiteral( 
"GO" ),
 
  431        QStringLiteral( 
"GOTO" ),
 
  432        QStringLiteral( 
"GRANT" ),
 
  433        QStringLiteral( 
"GRAPHIC" ),
 
  434        QStringLiteral( 
"GROUP" ),
 
  435        QStringLiteral( 
"GROUPING" ),
 
  436        QStringLiteral( 
"GROUPS" ),
 
  437        QStringLiteral( 
"GT" ),
 
  438        QStringLiteral( 
"HANDLER" ),
 
  439        QStringLiteral( 
"HASH" ),
 
  440        QStringLiteral( 
"HASHAMP" ),
 
  441        QStringLiteral( 
"HASHBAKAMP" ),
 
  442        QStringLiteral( 
"HASHBUCKET" ),
 
  443        QStringLiteral( 
"HASHROW" ),
 
  444        QStringLiteral( 
"HAVING" ),
 
  445        QStringLiteral( 
"HELP" ),
 
  446        QStringLiteral( 
"HIGH_PRIORITY" ),
 
  447        QStringLiteral( 
"HOLD" ),
 
  448        QStringLiteral( 
"HOLDLOCK" ),
 
  449        QStringLiteral( 
"HOST" ),
 
  450        QStringLiteral( 
"HOUR" ),
 
  451        QStringLiteral( 
"HOUR_MICROSECOND" ),
 
  452        QStringLiteral( 
"HOUR_MINUTE" ),
 
  453        QStringLiteral( 
"HOURS" ),
 
  454        QStringLiteral( 
"HOUR_SECOND" ),
 
  455        QStringLiteral( 
"IDENTIFIED" ),
 
  456        QStringLiteral( 
"IDENTITY" ),
 
  457        QStringLiteral( 
"IDENTITYCOL" ),
 
  458        QStringLiteral( 
"IDENTITY_INSERT" ),
 
  459        QStringLiteral( 
"IF" ),
 
  460        QStringLiteral( 
"IGNORE" ),
 
  461        QStringLiteral( 
"ILIKE" ),
 
  462        QStringLiteral( 
"IMMEDIATE" ),
 
  463        QStringLiteral( 
"IN" ),
 
  464        QStringLiteral( 
"INCLUSIVE" ),
 
  465        QStringLiteral( 
"INCONSISTENT" ),
 
  466        QStringLiteral( 
"INCREMENT" ),
 
  467        QStringLiteral( 
"INDEX" ),
 
  468        QStringLiteral( 
"INDICATOR" ),
 
  469        QStringLiteral( 
"INFILE" ),
 
  470        QStringLiteral( 
"INHERIT" ),
 
  471        QStringLiteral( 
"INITIAL" ),
 
  472        QStringLiteral( 
"INITIALIZE" ),
 
  473        QStringLiteral( 
"INITIALLY" ),
 
  474        QStringLiteral( 
"INITIATE" ),
 
  475        QStringLiteral( 
"INNER" ),
 
  476        QStringLiteral( 
"INOUT" ),
 
  477        QStringLiteral( 
"INPUT" ),
 
  478        QStringLiteral( 
"INS" ),
 
  479        QStringLiteral( 
"INSENSITIVE" ),
 
  480        QStringLiteral( 
"INSERT" ),
 
  481        QStringLiteral( 
"INSTEAD" ),
 
  482        QStringLiteral( 
"INT" ),
 
  483        QStringLiteral( 
"INT1" ),
 
  484        QStringLiteral( 
"INT2" ),
 
  485        QStringLiteral( 
"INT3" ),
 
  486        QStringLiteral( 
"INT4" ),
 
  487        QStringLiteral( 
"INT8" ),
 
  488        QStringLiteral( 
"INTEGER" ),
 
  489        QStringLiteral( 
"INTEGERDATE" ),
 
  490        QStringLiteral( 
"INTERSECT" ),
 
  491        QStringLiteral( 
"INTERSECTION" ),
 
  492        QStringLiteral( 
"INTERVAL" ),
 
  493        QStringLiteral( 
"INTO" ),
 
  494        QStringLiteral( 
"IO_AFTER_GTIDS" ),
 
  495        QStringLiteral( 
"IO_BEFORE_GTIDS" ),
 
  496        QStringLiteral( 
"IS" ),
 
  497        QStringLiteral( 
"ISNULL" ),
 
  498        QStringLiteral( 
"ISOBID" ),
 
  499        QStringLiteral( 
"ISOLATION" ),
 
  500        QStringLiteral( 
"ITERATE" ),
 
  501        QStringLiteral( 
"JAR" ),
 
  502        QStringLiteral( 
"JOIN" ),
 
  503        QStringLiteral( 
"JOURNAL" ),
 
  504        QStringLiteral( 
"JSON_ARRAY" ),
 
  505        QStringLiteral( 
"JSON_ARRAYAGG" ),
 
  506        QStringLiteral( 
"JSON_EXISTS" ),
 
  507        QStringLiteral( 
"JSON_OBJECT" ),
 
  508        QStringLiteral( 
"JSON_OBJECTAGG" ),
 
  509        QStringLiteral( 
"JSON_QUERY" ),
 
  510        QStringLiteral( 
"JSON_TABLE" ),
 
  511        QStringLiteral( 
"JSON_TABLE_PRIMITIVE" ),
 
  512        QStringLiteral( 
"JSON_VALUE" ),
 
  513        QStringLiteral( 
"KEEP" ),
 
  514        QStringLiteral( 
"KEY" ),
 
  515        QStringLiteral( 
"KEYS" ),
 
  516        QStringLiteral( 
"KILL" ),
 
  517        QStringLiteral( 
"KURTOSIS" ),
 
  518        QStringLiteral( 
"LABEL" ),
 
  519        QStringLiteral( 
"LAG" ),
 
  520        QStringLiteral( 
"LANGUAGE" ),
 
  521        QStringLiteral( 
"LARGE" ),
 
  522        QStringLiteral( 
"LAST" ),
 
  523        QStringLiteral( 
"LAST_VALUE" ),
 
  524        QStringLiteral( 
"LATERAL" ),
 
  525        QStringLiteral( 
"LC_CTYPE" ),
 
  526        QStringLiteral( 
"LE" ),
 
  527        QStringLiteral( 
"LEAD" ),
 
  528        QStringLiteral( 
"LEADING" ),
 
  529        QStringLiteral( 
"LEAVE" ),
 
  530        QStringLiteral( 
"LEFT" ),
 
  531        QStringLiteral( 
"LESS" ),
 
  532        QStringLiteral( 
"LEVEL" ),
 
  533        QStringLiteral( 
"LIKE" ),
 
  534        QStringLiteral( 
"LIKE_REGEX" ),
 
  535        QStringLiteral( 
"LIMIT" ),
 
  536        QStringLiteral( 
"LINEAR" ),
 
  537        QStringLiteral( 
"LINENO" ),
 
  538        QStringLiteral( 
"LINES" ),
 
  539        QStringLiteral( 
"LISTAGG" ),
 
  540        QStringLiteral( 
"LN" ),
 
  541        QStringLiteral( 
"LOAD" ),
 
  542        QStringLiteral( 
"LOADING" ),
 
  543        QStringLiteral( 
"LOCAL" ),
 
  544        QStringLiteral( 
"LOCALE" ),
 
  545        QStringLiteral( 
"LOCALTIME" ),
 
  546        QStringLiteral( 
"LOCALTIMESTAMP" ),
 
  547        QStringLiteral( 
"LOCATOR" ),
 
  548        QStringLiteral( 
"LOCATORS" ),
 
  549        QStringLiteral( 
"LOCK" ),
 
  550        QStringLiteral( 
"LOCKING" ),
 
  551        QStringLiteral( 
"LOCKMAX" ),
 
  552        QStringLiteral( 
"LOCKSIZE" ),
 
  553        QStringLiteral( 
"LOG" ),
 
  554        QStringLiteral( 
"LOG10" ),
 
  555        QStringLiteral( 
"LOGGING" ),
 
  556        QStringLiteral( 
"LOGON" ),
 
  557        QStringLiteral( 
"LONG" ),
 
  558        QStringLiteral( 
"LONGBLOB" ),
 
  559        QStringLiteral( 
"LONGTEXT" ),
 
  560        QStringLiteral( 
"LOOP" ),
 
  561        QStringLiteral( 
"LOWER" ),
 
  562        QStringLiteral( 
"LOW_PRIORITY" ),
 
  563        QStringLiteral( 
"LT" ),
 
  564        QStringLiteral( 
"MACRO" ),
 
  565        QStringLiteral( 
"MAINTAINED" ),
 
  566        QStringLiteral( 
"MAP" ),
 
  567        QStringLiteral( 
"MASTER_BIND" ),
 
  568        QStringLiteral( 
"MASTER_SSL_VERIFY_SERVER_CERT" ),
 
  569        QStringLiteral( 
"MATCH" ),
 
  570        QStringLiteral( 
"MATCHES" ),
 
  571        QStringLiteral( 
"MATCH_NUMBER" ),
 
  572        QStringLiteral( 
"MATCH_RECOGNIZE" ),
 
  573        QStringLiteral( 
"MATERIALIZED" ),
 
  574        QStringLiteral( 
"MAVG" ),
 
  575        QStringLiteral( 
"MAX" ),
 
  576        QStringLiteral( 
"MAXEXTENTS" ),
 
  577        QStringLiteral( 
"MAXIMUM" ),
 
  578        QStringLiteral( 
"MAXVALUE" ),
 
  579        QStringLiteral( 
"MCHARACTERS" ),
 
  580        QStringLiteral( 
"MDIFF" ),
 
  581        QStringLiteral( 
"MEDIUMBLOB" ),
 
  582        QStringLiteral( 
"MEDIUMINT" ),
 
  583        QStringLiteral( 
"MEDIUMTEXT" ),
 
  584        QStringLiteral( 
"MEMBER" ),
 
  585        QStringLiteral( 
"MERGE" ),
 
  586        QStringLiteral( 
"METHOD" ),
 
  587        QStringLiteral( 
"MICROSECOND" ),
 
  588        QStringLiteral( 
"MICROSECONDS" ),
 
  589        QStringLiteral( 
"MIDDLEINT" ),
 
  590        QStringLiteral( 
"MIN" ),
 
  591        QStringLiteral( 
"MINDEX" ),
 
  592        QStringLiteral( 
"MINIMUM" ),
 
  593        QStringLiteral( 
"MINUS" ),
 
  594        QStringLiteral( 
"MINUTE" ),
 
  595        QStringLiteral( 
"MINUTE_MICROSECOND" ),
 
  596        QStringLiteral( 
"MINUTES" ),
 
  597        QStringLiteral( 
"MINUTE_SECOND" ),
 
  598        QStringLiteral( 
"MLINREG" ),
 
  599        QStringLiteral( 
"MLOAD" ),
 
  600        QStringLiteral( 
"MLSLABEL" ),
 
  601        QStringLiteral( 
"MOD" ),
 
  602        QStringLiteral( 
"MODE" ),
 
  603        QStringLiteral( 
"MODIFIES" ),
 
  604        QStringLiteral( 
"MODIFY" ),
 
  605        QStringLiteral( 
"MODULE" ),
 
  606        QStringLiteral( 
"MONITOR" ),
 
  607        QStringLiteral( 
"MONRESOURCE" ),
 
  608        QStringLiteral( 
"MONSESSION" ),
 
  609        QStringLiteral( 
"MONTH" ),
 
  610        QStringLiteral( 
"MONTHS" ),
 
  611        QStringLiteral( 
"MSUBSTR" ),
 
  612        QStringLiteral( 
"MSUM" ),
 
  613        QStringLiteral( 
"MULTISET" ),
 
  614        QStringLiteral( 
"NAMED" ),
 
  615        QStringLiteral( 
"NAMES" ),
 
  616        QStringLiteral( 
"NATIONAL" ),
 
  617        QStringLiteral( 
"NATURAL" ),
 
  618        QStringLiteral( 
"NCHAR" ),
 
  619        QStringLiteral( 
"NCLOB" ),
 
  620        QStringLiteral( 
"NE" ),
 
  621        QStringLiteral( 
"NESTED_TABLE_ID" ),
 
  622        QStringLiteral( 
"NEW" ),
 
  623        QStringLiteral( 
"NEW_TABLE" ),
 
  624        QStringLiteral( 
"NEXT" ),
 
  625        QStringLiteral( 
"NEXTVAL" ),
 
  626        QStringLiteral( 
"NO" ),
 
  627        QStringLiteral( 
"NOAUDIT" ),
 
  628        QStringLiteral( 
"NOCHECK" ),
 
  629        QStringLiteral( 
"NOCOMPRESS" ),
 
  630        QStringLiteral( 
"NONCLUSTERED" ),
 
  631        QStringLiteral( 
"NONE" ),
 
  632        QStringLiteral( 
"NORMALIZE" ),
 
  633        QStringLiteral( 
"NOT" ),
 
  634        QStringLiteral( 
"NOTNULL" ),
 
  635        QStringLiteral( 
"NOWAIT" ),
 
  636        QStringLiteral( 
"NO_WRITE_TO_BINLOG" ),
 
  637        QStringLiteral( 
"NTH_VALUE" ),
 
  638        QStringLiteral( 
"NTILE" ),
 
  639        QStringLiteral( 
"NULL" ),
 
  640        QStringLiteral( 
"NULLIF" ),
 
  641        QStringLiteral( 
"NULLIFZERO" ),
 
  642        QStringLiteral( 
"NULLS" ),
 
  643        QStringLiteral( 
"NUMBER" ),
 
  644        QStringLiteral( 
"NUMERIC" ),
 
  645        QStringLiteral( 
"NUMPARTS" ),
 
  646        QStringLiteral( 
"OBID" ),
 
  647        QStringLiteral( 
"OBJECT" ),
 
  648        QStringLiteral( 
"OBJECTS" ),
 
  649        QStringLiteral( 
"OCCURRENCES_REGEX" ),
 
  650        QStringLiteral( 
"OCTET_LENGTH" ),
 
  651        QStringLiteral( 
"OF" ),
 
  652        QStringLiteral( 
"OFF" ),
 
  653        QStringLiteral( 
"OFFLINE" ),
 
  654        QStringLiteral( 
"OFFSET" ),
 
  655        QStringLiteral( 
"OFFSETS" ),
 
  656        QStringLiteral( 
"OLD" ),
 
  657        QStringLiteral( 
"OLD_TABLE" ),
 
  658        QStringLiteral( 
"OMIT" ),
 
  659        QStringLiteral( 
"ON" ),
 
  660        QStringLiteral( 
"ONE" ),
 
  661        QStringLiteral( 
"ONLINE" ),
 
  662        QStringLiteral( 
"ONLY" ),
 
  663        QStringLiteral( 
"OPEN" ),
 
  664        QStringLiteral( 
"OPENDATASOURCE" ),
 
  665        QStringLiteral( 
"OPENQUERY" ),
 
  666        QStringLiteral( 
"OPENROWSET" ),
 
  667        QStringLiteral( 
"OPENXML" ),
 
  668        QStringLiteral( 
"OPERATION" ),
 
  669        QStringLiteral( 
"OPTIMIZATION" ),
 
  670        QStringLiteral( 
"OPTIMIZE" ),
 
  671        QStringLiteral( 
"OPTIMIZER_COSTS" ),
 
  672        QStringLiteral( 
"OPTION" ),
 
  673        QStringLiteral( 
"OPTIONALLY" ),
 
  674        QStringLiteral( 
"OR" ),
 
  675        QStringLiteral( 
"ORDER" ),
 
  676        QStringLiteral( 
"ORDINALITY" ),
 
  677        QStringLiteral( 
"ORGANIZATION" ),
 
  678        QStringLiteral( 
"OUT" ),
 
  679        QStringLiteral( 
"OUTER" ),
 
  680        QStringLiteral( 
"OUTFILE" ),
 
  681        QStringLiteral( 
"OUTPUT" ),
 
  682        QStringLiteral( 
"OVER" ),
 
  683        QStringLiteral( 
"OVERLAPS" ),
 
  684        QStringLiteral( 
"OVERLAY" ),
 
  685        QStringLiteral( 
"OVERRIDE" ),
 
  686        QStringLiteral( 
"PACKAGE" ),
 
  687        QStringLiteral( 
"PAD" ),
 
  688        QStringLiteral( 
"PADDED" ),
 
  689        QStringLiteral( 
"PARAMETER" ),
 
  690        QStringLiteral( 
"PARAMETERS" ),
 
  691        QStringLiteral( 
"PART" ),
 
  692        QStringLiteral( 
"PARTIAL" ),
 
  693        QStringLiteral( 
"PARTITION" ),
 
  694        QStringLiteral( 
"PARTITIONED" ),
 
  695        QStringLiteral( 
"PARTITIONING" ),
 
  696        QStringLiteral( 
"PASSWORD" ),
 
  697        QStringLiteral( 
"PATH" ),
 
  698        QStringLiteral( 
"PATTERN" ),
 
  699        QStringLiteral( 
"PCTFREE" ),
 
  700        QStringLiteral( 
"PER" ),
 
  701        QStringLiteral( 
"PERCENT" ),
 
  702        QStringLiteral( 
"PERCENTILE_CONT" ),
 
  703        QStringLiteral( 
"PERCENTILE_DISC" ),
 
  704        QStringLiteral( 
"PERCENT_RANK" ),
 
  705        QStringLiteral( 
"PERIOD" ),
 
  706        QStringLiteral( 
"PERM" ),
 
  707        QStringLiteral( 
"PERMANENT" ),
 
  708        QStringLiteral( 
"PIECESIZE" ),
 
  709        QStringLiteral( 
"PIVOT" ),
 
  710        QStringLiteral( 
"PLACING" ),
 
  711        QStringLiteral( 
"PLAN" ),
 
  712        QStringLiteral( 
"PORTION" ),
 
  713        QStringLiteral( 
"POSITION" ),
 
  714        QStringLiteral( 
"POSITION_REGEX" ),
 
  715        QStringLiteral( 
"POSTFIX" ),
 
  716        QStringLiteral( 
"POWER" ),
 
  717        QStringLiteral( 
"PRECEDES" ),
 
  718        QStringLiteral( 
"PRECISION" ),
 
  719        QStringLiteral( 
"PREFIX" ),
 
  720        QStringLiteral( 
"PREORDER" ),
 
  721        QStringLiteral( 
"PREPARE" ),
 
  722        QStringLiteral( 
"PRESERVE" ),
 
  723        QStringLiteral( 
"PREVVAL" ),
 
  724        QStringLiteral( 
"PRIMARY" ),
 
  725        QStringLiteral( 
"PRINT" ),
 
  726        QStringLiteral( 
"PRIOR" ),
 
  727        QStringLiteral( 
"PRIQTY" ),
 
  728        QStringLiteral( 
"PRIVATE" ),
 
  729        QStringLiteral( 
"PRIVILEGES" ),
 
  730        QStringLiteral( 
"PROC" ),
 
  731        QStringLiteral( 
"PROCEDURE" ),
 
  732        QStringLiteral( 
"PROFILE" ),
 
  733        QStringLiteral( 
"PROGRAM" ),
 
  734        QStringLiteral( 
"PROPORTIONAL" ),
 
  735        QStringLiteral( 
"PROTECTION" ),
 
  736        QStringLiteral( 
"PSID" ),
 
  737        QStringLiteral( 
"PTF" ),
 
  738        QStringLiteral( 
"PUBLIC" ),
 
  739        QStringLiteral( 
"PURGE" ),
 
  740        QStringLiteral( 
"QUALIFIED" ),
 
  741        QStringLiteral( 
"QUALIFY" ),
 
  742        QStringLiteral( 
"QUANTILE" ),
 
  743        QStringLiteral( 
"QUERY" ),
 
  744        QStringLiteral( 
"QUERYNO" ),
 
  745        QStringLiteral( 
"RADIANS" ),
 
  746        QStringLiteral( 
"RAISERROR" ),
 
  747        QStringLiteral( 
"RANDOM" ),
 
  748        QStringLiteral( 
"RANGE" ),
 
  749        QStringLiteral( 
"RANGE_N" ),
 
  750        QStringLiteral( 
"RANK" ),
 
  751        QStringLiteral( 
"RAW" ),
 
  752        QStringLiteral( 
"READ" ),
 
  753        QStringLiteral( 
"READS" ),
 
  754        QStringLiteral( 
"READTEXT" ),
 
  755        QStringLiteral( 
"READ_WRITE" ),
 
  756        QStringLiteral( 
"REAL" ),
 
  757        QStringLiteral( 
"RECONFIGURE" ),
 
  758        QStringLiteral( 
"RECURSIVE" ),
 
  759        QStringLiteral( 
"REF" ),
 
  760        QStringLiteral( 
"REFERENCES" ),
 
  761        QStringLiteral( 
"REFERENCING" ),
 
  762        QStringLiteral( 
"REFRESH" ),
 
  763        QStringLiteral( 
"REGEXP" ),
 
  764        QStringLiteral( 
"REGR_AVGX" ),
 
  765        QStringLiteral( 
"REGR_AVGY" ),
 
  766        QStringLiteral( 
"REGR_COUNT" ),
 
  767        QStringLiteral( 
"REGR_INTERCEPT" ),
 
  768        QStringLiteral( 
"REGR_R2" ),
 
  769        QStringLiteral( 
"REGR_SLOPE" ),
 
  770        QStringLiteral( 
"REGR_SXX" ),
 
  771        QStringLiteral( 
"REGR_SXY" ),
 
  772        QStringLiteral( 
"REGR_SYY" ),
 
  773        QStringLiteral( 
"RELATIVE" ),
 
  774        QStringLiteral( 
"RELEASE" ),
 
  775        QStringLiteral( 
"RENAME" ),
 
  776        QStringLiteral( 
"REPEAT" ),
 
  777        QStringLiteral( 
"REPLACE" ),
 
  778        QStringLiteral( 
"REPLICATION" ),
 
  779        QStringLiteral( 
"REPOVERRIDE" ),
 
  780        QStringLiteral( 
"REQUEST" ),
 
  781        QStringLiteral( 
"REQUIRE" ),
 
  782        QStringLiteral( 
"RESIGNAL" ),
 
  783        QStringLiteral( 
"RESOURCE" ),
 
  784        QStringLiteral( 
"RESTART" ),
 
  785        QStringLiteral( 
"RESTORE" ),
 
  786        QStringLiteral( 
"RESTRICT" ),
 
  787        QStringLiteral( 
"RESULT" ),
 
  788        QStringLiteral( 
"RESULT_SET_LOCATOR" ),
 
  789        QStringLiteral( 
"RESUME" ),
 
  790        QStringLiteral( 
"RET" ),
 
  791        QStringLiteral( 
"RETRIEVE" ),
 
  792        QStringLiteral( 
"RETURN" ),
 
  793        QStringLiteral( 
"RETURNING" ),
 
  794        QStringLiteral( 
"RETURNS" ),
 
  795        QStringLiteral( 
"REVALIDATE" ),
 
  796        QStringLiteral( 
"REVERT" ),
 
  797        QStringLiteral( 
"REVOKE" ),
 
  798        QStringLiteral( 
"RIGHT" ),
 
  799        QStringLiteral( 
"RIGHTS" ),
 
  800        QStringLiteral( 
"RLIKE" ),
 
  801        QStringLiteral( 
"ROLE" ),
 
  802        QStringLiteral( 
"ROLLBACK" ),
 
  803        QStringLiteral( 
"ROLLFORWARD" ),
 
  804        QStringLiteral( 
"ROLLUP" ),
 
  805        QStringLiteral( 
"ROUND_CEILING" ),
 
  806        QStringLiteral( 
"ROUND_DOWN" ),
 
  807        QStringLiteral( 
"ROUND_FLOOR" ),
 
  808        QStringLiteral( 
"ROUND_HALF_DOWN" ),
 
  809        QStringLiteral( 
"ROUND_HALF_EVEN" ),
 
  810        QStringLiteral( 
"ROUND_HALF_UP" ),
 
  811        QStringLiteral( 
"ROUND_UP" ),
 
  812        QStringLiteral( 
"ROUTINE" ),
 
  813        QStringLiteral( 
"ROW" ),
 
  814        QStringLiteral( 
"ROWCOUNT" ),
 
  815        QStringLiteral( 
"ROWGUIDCOL" ),
 
  816        QStringLiteral( 
"ROWID" ),
 
  817        QStringLiteral( 
"ROWNUM" ),
 
  818        QStringLiteral( 
"ROW_NUMBER" ),
 
  819        QStringLiteral( 
"ROWS" ),
 
  820        QStringLiteral( 
"ROWSET" ),
 
  821        QStringLiteral( 
"RULE" ),
 
  822        QStringLiteral( 
"RUN" ),
 
  823        QStringLiteral( 
"RUNNING" ),
 
  824        QStringLiteral( 
"SAMPLE" ),
 
  825        QStringLiteral( 
"SAMPLEID" ),
 
  826        QStringLiteral( 
"SAVE" ),
 
  827        QStringLiteral( 
"SAVEPOINT" ),
 
  828        QStringLiteral( 
"SCHEMA" ),
 
  829        QStringLiteral( 
"SCHEMAS" ),
 
  830        QStringLiteral( 
"SCOPE" ),
 
  831        QStringLiteral( 
"SCRATCHPAD" ),
 
  832        QStringLiteral( 
"SCROLL" ),
 
  833        QStringLiteral( 
"SEARCH" ),
 
  834        QStringLiteral( 
"SECOND" ),
 
  835        QStringLiteral( 
"SECOND_MICROSECOND" ),
 
  836        QStringLiteral( 
"SECONDS" ),
 
  837        QStringLiteral( 
"SECQTY" ),
 
  838        QStringLiteral( 
"SECTION" ),
 
  839        QStringLiteral( 
"SECURITY" ),
 
  840        QStringLiteral( 
"SECURITYAUDIT" ),
 
  841        QStringLiteral( 
"SEEK" ),
 
  842        QStringLiteral( 
"SEL" ),
 
  843        QStringLiteral( 
"SELECT" ),
 
  844        QStringLiteral( 
"SEMANTICKEYPHRASETABLE" ),
 
  845        QStringLiteral( 
"SEMANTICSIMILARITYDETAILSTABLE" ),
 
  846        QStringLiteral( 
"SEMANTICSIMILARITYTABLE" ),
 
  847        QStringLiteral( 
"SENSITIVE" ),
 
  848        QStringLiteral( 
"SEPARATOR" ),
 
  849        QStringLiteral( 
"SEQUENCE" ),
 
  850        QStringLiteral( 
"SESSION" ),
 
  851        QStringLiteral( 
"SESSION_USER" ),
 
  852        QStringLiteral( 
"SET" ),
 
  853        QStringLiteral( 
"SETRESRATE" ),
 
  854        QStringLiteral( 
"SETS" ),
 
  855        QStringLiteral( 
"SETSESSRATE" ),
 
  856        QStringLiteral( 
"SETUSER" ),
 
  857        QStringLiteral( 
"SHARE" ),
 
  858        QStringLiteral( 
"SHOW" ),
 
  859        QStringLiteral( 
"SHUTDOWN" ),
 
  860        QStringLiteral( 
"SIGNAL" ),
 
  861        QStringLiteral( 
"SIMILAR" ),
 
  862        QStringLiteral( 
"SIMPLE" ),
 
  863        QStringLiteral( 
"SIN" ),
 
  864        QStringLiteral( 
"SINH" ),
 
  865        QStringLiteral( 
"SIZE" ),
 
  866        QStringLiteral( 
"SKEW" ),
 
  867        QStringLiteral( 
"SKIP" ),
 
  868        QStringLiteral( 
"SMALLINT" ),
 
  869        QStringLiteral( 
"SOME" ),
 
  870        QStringLiteral( 
"SOUNDEX" ),
 
  871        QStringLiteral( 
"SOURCE" ),
 
  872        QStringLiteral( 
"SPACE" ),
 
  873        QStringLiteral( 
"SPATIAL" ),
 
  874        QStringLiteral( 
"SPECIFIC" ),
 
  875        QStringLiteral( 
"SPECIFICTYPE" ),
 
  876        QStringLiteral( 
"SPOOL" ),
 
  877        QStringLiteral( 
"SQL" ),
 
  878        QStringLiteral( 
"SQL_BIG_RESULT" ),
 
  879        QStringLiteral( 
"SQL_CALC_FOUND_ROWS" ),
 
  880        QStringLiteral( 
"SQLEXCEPTION" ),
 
  881        QStringLiteral( 
"SQL_SMALL_RESULT" ),
 
  882        QStringLiteral( 
"SQLSTATE" ),
 
  883        QStringLiteral( 
"SQLTEXT" ),
 
  884        QStringLiteral( 
"SQLWARNING" ),
 
  885        QStringLiteral( 
"SQRT" ),
 
  886        QStringLiteral( 
"SS" ),
 
  887        QStringLiteral( 
"SSL" ),
 
  888        QStringLiteral( 
"STANDARD" ),
 
  889        QStringLiteral( 
"START" ),
 
  890        QStringLiteral( 
"STARTING" ),
 
  891        QStringLiteral( 
"STARTUP" ),
 
  892        QStringLiteral( 
"STATE" ),
 
  893        QStringLiteral( 
"STATEMENT" ),
 
  894        QStringLiteral( 
"STATIC" ),
 
  895        QStringLiteral( 
"STATISTICS" ),
 
  896        QStringLiteral( 
"STAY" ),
 
  897        QStringLiteral( 
"STDDEV_POP" ),
 
  898        QStringLiteral( 
"STDDEV_SAMP" ),
 
  899        QStringLiteral( 
"STEPINFO" ),
 
  900        QStringLiteral( 
"STOGROUP" ),
 
  901        QStringLiteral( 
"STORED" ),
 
  902        QStringLiteral( 
"STORES" ),
 
  903        QStringLiteral( 
"STRAIGHT_JOIN" ),
 
  904        QStringLiteral( 
"STRING_CS" ),
 
  905        QStringLiteral( 
"STRUCTURE" ),
 
  906        QStringLiteral( 
"STYLE" ),
 
  907        QStringLiteral( 
"SUBMULTISET" ),
 
  908        QStringLiteral( 
"SUBSCRIBER" ),
 
  909        QStringLiteral( 
"SUBSET" ),
 
  910        QStringLiteral( 
"SUBSTR" ),
 
  911        QStringLiteral( 
"SUBSTRING" ),
 
  912        QStringLiteral( 
"SUBSTRING_REGEX" ),
 
  913        QStringLiteral( 
"SUCCEEDS" ),
 
  914        QStringLiteral( 
"SUCCESSFUL" ),
 
  915        QStringLiteral( 
"SUM" ),
 
  916        QStringLiteral( 
"SUMMARY" ),
 
  917        QStringLiteral( 
"SUSPEND" ),
 
  918        QStringLiteral( 
"SYMMETRIC" ),
 
  919        QStringLiteral( 
"SYNONYM" ),
 
  920        QStringLiteral( 
"SYSDATE" ),
 
  921        QStringLiteral( 
"SYSTEM" ),
 
  922        QStringLiteral( 
"SYSTEM_TIME" ),
 
  923        QStringLiteral( 
"SYSTEM_USER" ),
 
  924        QStringLiteral( 
"SYSTIMESTAMP" ),
 
  925        QStringLiteral( 
"TABLE" ),
 
  926        QStringLiteral( 
"TABLESAMPLE" ),
 
  927        QStringLiteral( 
"TABLESPACE" ),
 
  928        QStringLiteral( 
"TAN" ),
 
  929        QStringLiteral( 
"TANH" ),
 
  930        QStringLiteral( 
"TBL_CS" ),
 
  931        QStringLiteral( 
"TEMPORARY" ),
 
  932        QStringLiteral( 
"TERMINATE" ),
 
  933        QStringLiteral( 
"TERMINATED" ),
 
  934        QStringLiteral( 
"TEXTSIZE" ),
 
  935        QStringLiteral( 
"THAN" ),
 
  936        QStringLiteral( 
"THEN" ),
 
  937        QStringLiteral( 
"THRESHOLD" ),
 
  938        QStringLiteral( 
"TIME" ),
 
  939        QStringLiteral( 
"TIMESTAMP" ),
 
  940        QStringLiteral( 
"TIMEZONE_HOUR" ),
 
  941        QStringLiteral( 
"TIMEZONE_MINUTE" ),
 
  942        QStringLiteral( 
"TINYBLOB" ),
 
  943        QStringLiteral( 
"TINYINT" ),
 
  944        QStringLiteral( 
"TINYTEXT" ),
 
  945        QStringLiteral( 
"TITLE" ),
 
  946        QStringLiteral( 
"TO" ),
 
  947        QStringLiteral( 
"TOP" ),
 
  948        QStringLiteral( 
"TRACE" ),
 
  949        QStringLiteral( 
"TRAILING" ),
 
  950        QStringLiteral( 
"TRAN" ),
 
  951        QStringLiteral( 
"TRANSACTION" ),
 
  952        QStringLiteral( 
"TRANSLATE" ),
 
  953        QStringLiteral( 
"TRANSLATE_CHK" ),
 
  954        QStringLiteral( 
"TRANSLATE_REGEX" ),
 
  955        QStringLiteral( 
"TRANSLATION" ),
 
  956        QStringLiteral( 
"TREAT" ),
 
  957        QStringLiteral( 
"TRIGGER" ),
 
  958        QStringLiteral( 
"TRIM" ),
 
  959        QStringLiteral( 
"TRIM_ARRAY" ),
 
  960        QStringLiteral( 
"TRUE" ),
 
  961        QStringLiteral( 
"TRUNCATE" ),
 
  962        QStringLiteral( 
"TRY_CONVERT" ),
 
  963        QStringLiteral( 
"TSEQUAL" ),
 
  964        QStringLiteral( 
"TYPE" ),
 
  965        QStringLiteral( 
"UC" ),
 
  966        QStringLiteral( 
"UESCAPE" ),
 
  967        QStringLiteral( 
"UID" ),
 
  968        QStringLiteral( 
"UNDEFINED" ),
 
  969        QStringLiteral( 
"UNDER" ),
 
  970        QStringLiteral( 
"UNDO" ),
 
  971        QStringLiteral( 
"UNION" ),
 
  972        QStringLiteral( 
"UNIQUE" ),
 
  973        QStringLiteral( 
"UNKNOWN" ),
 
  974        QStringLiteral( 
"UNLOCK" ),
 
  975        QStringLiteral( 
"UNNEST" ),
 
  976        QStringLiteral( 
"UNPIVOT" ),
 
  977        QStringLiteral( 
"UNSIGNED" ),
 
  978        QStringLiteral( 
"UNTIL" ),
 
  979        QStringLiteral( 
"UPD" ),
 
  980        QStringLiteral( 
"UPDATE" ),
 
  981        QStringLiteral( 
"UPDATETEXT" ),
 
  982        QStringLiteral( 
"UPPER" ),
 
  983        QStringLiteral( 
"UPPERCASE" ),
 
  984        QStringLiteral( 
"USAGE" ),
 
  985        QStringLiteral( 
"USE" ),
 
  986        QStringLiteral( 
"USER" ),
 
  987        QStringLiteral( 
"USING" ),
 
  988        QStringLiteral( 
"UTC_DATE" ),
 
  989        QStringLiteral( 
"UTC_TIME" ),
 
  990        QStringLiteral( 
"UTC_TIMESTAMP" ),
 
  991        QStringLiteral( 
"VALIDATE" ),
 
  992        QStringLiteral( 
"VALIDPROC" ),
 
  993        QStringLiteral( 
"VALUE" ),
 
  994        QStringLiteral( 
"VALUE_OF" ),
 
  995        QStringLiteral( 
"VALUES" ),
 
  996        QStringLiteral( 
"VARBINARY" ),
 
  997        QStringLiteral( 
"VARBYTE" ),
 
  998        QStringLiteral( 
"VARCHAR" ),
 
  999        QStringLiteral( 
"VARCHAR2" ),
 
 1000        QStringLiteral( 
"VARCHARACTER" ),
 
 1001        QStringLiteral( 
"VARGRAPHIC" ),
 
 1002        QStringLiteral( 
"VARIABLE" ),
 
 1003        QStringLiteral( 
"VARIADIC" ),
 
 1004        QStringLiteral( 
"VARIANT" ),
 
 1005        QStringLiteral( 
"VAR_POP" ),
 
 1006        QStringLiteral( 
"VAR_SAMP" ),
 
 1007        QStringLiteral( 
"VARYING" ),
 
 1008        QStringLiteral( 
"VCAT" ),
 
 1009        QStringLiteral( 
"VERBOSE" ),
 
 1010        QStringLiteral( 
"VERSIONING" ),
 
 1011        QStringLiteral( 
"VIEW" ),
 
 1012        QStringLiteral( 
"VIRTUAL" ),
 
 1013        QStringLiteral( 
"VOLATILE" ),
 
 1014        QStringLiteral( 
"VOLUMES" ),
 
 1015        QStringLiteral( 
"WAIT" ),
 
 1016        QStringLiteral( 
"WAITFOR" ),
 
 1017        QStringLiteral( 
"WHEN" ),
 
 1018        QStringLiteral( 
"WHENEVER" ),
 
 1019        QStringLiteral( 
"WHERE" ),
 
 1020        QStringLiteral( 
"WHILE" ),
 
 1021        QStringLiteral( 
"WIDTH_BUCKET" ),
 
 1022        QStringLiteral( 
"WINDOW" ),
 
 1023        QStringLiteral( 
"WITH" ),
 
 1024        QStringLiteral( 
"WITHIN" ),
 
 1025        QStringLiteral( 
"WITHIN_GROUP" ),
 
 1026        QStringLiteral( 
"WITHOUT" ),
 
 1027        QStringLiteral( 
"WLM" ),
 
 1028        QStringLiteral( 
"WORK" ),
 
 1029        QStringLiteral( 
"WRITE" ),
 
 1030        QStringLiteral( 
"WRITETEXT" ),
 
 1031        QStringLiteral( 
"XMLCAST" ),
 
 1032        QStringLiteral( 
"XMLEXISTS" ),
 
 1033        QStringLiteral( 
"XMLNAMESPACES" ),
 
 1034        QStringLiteral( 
"XOR" ),
 
 1035        QStringLiteral( 
"YEAR" ),
 
 1036        QStringLiteral( 
"YEAR_MONTH" ),
 
 1037        QStringLiteral( 
"YEARS" ),
 
 1038        QStringLiteral( 
"ZEROFILL" ),
 
 1039        QStringLiteral( 
"ZEROIFNULL" ),
 
 1040        QStringLiteral( 
"ZONE" ),
 
 
 1053  return QStringLiteral( 
"pk" );
 
 
 1058  return QStringLiteral( 
"geom" );
 
 
 1092    const QString &name,
 
 1097    const QMap<QString, QVariant> *
 
 1104  Q_UNUSED( overwrite );
 
 1105  Q_UNUSED( options );
 
 1106  Q_UNUSED( wkbType );
 
 
 1135  const QList<QgsAbstractDatabaseProviderConnection::TableProperty> constTables { 
tables( schema ) };
 
 1136  for ( 
const auto &t : constTables )
 
 1138    if ( t.tableName() == name )
 
 
 1149  Q_UNUSED( feedback );
 
 1150  Q_UNUSED( searchContext );
 
 1151  Q_UNUSED( searchString );
 
 1152  Q_UNUSED( geographicExtent );
 
 
 1228  std::unique_ptr<QgsVectorLayer> vl { std::make_unique<QgsVectorLayer>( 
tableUri( schema, tableName ), QStringLiteral( 
"temp_layer" ), 
mProviderKey, options ) };
 
 1229  if ( ! vl->isValid() )
 
 1232                                          .arg( tableName, schema ) );
 
 1234  if ( vl->fields().lookupField( fieldName ) == -1 )
 
 1237                                          .arg( fieldName, tableName, schema ) );
 
 1240  if ( ! vl->dataProvider()->deleteAttributes( { vl->fields().lookupField( fieldName ) } ) )
 
 1243                                          .arg( fieldName, tableName, schema ) );
 
 
 1253  auto vl = std::make_unique<QgsVectorLayer>( 
tableUri( schema, tableName ), QStringLiteral( 
"temp_layer" ), 
mProviderKey, options ) ;
 
 1254  if ( ! vl->isValid() )
 
 1257                                          .arg( tableName, schema ) );
 
 1259  if ( vl->fields().lookupField( field.
name() ) != -1 )
 
 1262                                          .arg( field.
name(), tableName, schema ) );
 
 1265  if ( ! vl->dataProvider()->addAttributes( { field  } ) )
 
 1268                                          .arg( field.
name(), tableName, schema ) );
 
 
 1278  auto vl = std::make_unique<QgsVectorLayer>( 
tableUri( schema, tableName ), QStringLiteral( 
"temp_layer" ), 
mProviderKey, options ) ;
 
 1279  if ( ! vl->isValid() )
 
 1282                                          .arg( tableName, schema ) );
 
 1284  int existingIndex = vl->fields().lookupField( name );
 
 1285  if ( existingIndex == -1 )
 
 1288                                          .arg( name, tableName ) );
 
 1291  if ( vl->fields().lookupField( newName ) != -1 )
 
 1294                                          .arg( newName, tableName ) );
 
 1297  if ( ! vl->dataProvider()->renameAttributes( {{existingIndex, newName}} ) )
 
 1300                                          .arg( name, tableName, newName ) );
 
 
 1307  return QList<QgsAbstractDatabaseProviderConnection::TableProperty>();
 
 
 1314  const QList<QgsAbstractDatabaseProviderConnection::TableProperty> constTables { 
tables( schema, 
TableFlags(), feedback ) };
 
 1315  for ( 
const auto &t : constTables )
 
 1317    if ( t.tableName() == name )
 
 1323                                        .arg( name, schema ) );
 
 
 1335  return QStringList();
 
 
 1352  for ( 
const auto &t : std::as_const( mGeometryColumnTypes ) )
 
 1359  mGeometryColumnTypes.push_back( toAdd );
 
 
 1364  return mGeometryColumnTypes;
 
 
 1387  return QStringList();
 
 
 1444  QString n = mTableName;
 
 1445  if ( mGeometryColumnCount > 1 ) n += 
'.' + mGeometryColumn;
 
 
 1452  Q_UNUSED( tableName );
 
 1453  Q_UNUSED( targetSchema );
 
 
 1461  Q_ASSERT( index >= 0 && index < mGeometryColumnTypes.size() );
 
 1463  property.mGeometryColumnTypes << mGeometryColumnTypes[ index ];
 
 1464  property.mSchema = mSchema;
 
 1465  property.mTableName = mTableName;
 
 1466  property.mGeometryColumn = mGeometryColumn;
 
 1467  property.mPkColumns = mPkColumns;
 
 1468  property.mGeometryColumnCount = mGeometryColumnCount;
 
 1469  property.mFlags = mFlags;
 
 1470  property.mComment = mComment;
 
 1471  property.mInfo = mInfo;
 
 
 1492  return mSchema == other.mSchema &&
 
 1493         mTableName == other.mTableName &&
 
 1494         mGeometryColumn == other.mGeometryColumn &&
 
 1495         mGeometryColumnCount == other.mGeometryColumnCount &&
 
 1496         mPkColumns == other.mPkColumns &&
 
 1497         mFlags == other.mFlags &&
 
 1498         mComment == other.mComment &&
 
 1499         mInfo == other.mInfo;
 
 
 1505  mGeometryColumnTypes = columnTypes;
 
 
 1511  return mGeometryColumnCount;
 
 
 1516  mGeometryColumnCount = geometryColumnCount;
 
 
 1551  QList<QgsCoordinateReferenceSystem> crss;
 
 1552  for ( 
const auto &t : std::as_const( mGeometryColumnTypes ) )
 
 1554    crss.push_back( t.crs );
 
 
 1566  mPkColumns = pkColumns;
 
 
 1571  return mGeometryColumn;
 
 
 1576  mGeometryColumn = geometryColumn;
 
 
 1599  QList<QList<QVariant> > rows;
 
 1601  while ( mResultIterator &&
 
 1602          mResultIterator->hasNextRow() &&
 
 1605    const QVariantList row( mResultIterator->nextRow() );
 
 1606    if ( row.isEmpty() )
 
 1612      rows.push_back( row );
 
 1620  if ( ! mResultIterator )
 
 1622    return QList<QVariant>();
 
 1624  return mResultIterator->nextRow();
 
 1630  if ( ! mResultIterator )
 
 1634  return mResultIterator->fetchedRowCount();
 
 1639  if ( ! mResultIterator )
 
 1643  return mResultIterator->rowCount();
 
 1649  if ( ! mResultIterator )
 
 1653  return mResultIterator->hasNextRow();
 
 1656void QgsAbstractDatabaseProviderConnection::QueryResult::appendColumn( 
const QString &columnName )
 
 1658  mColumns.push_back( columnName );
 
 1662QgsAbstractDatabaseProviderConnection::QueryResult::QueryResult( std::shared_ptr<QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator> iterator )
 
 1663  : mResultIterator( iterator )
 
 1666double QgsAbstractDatabaseProviderConnection::QueryResult::queryExecutionTime()
 const 
 1668  return mQueryExecutionTime;
 
 1671void QgsAbstractDatabaseProviderConnection::QueryResult::setQueryExecutionTime( 
double queryExecutionTime )
 
 1673  mQueryExecutionTime = queryExecutionTime;
 
 1677QVariantList QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator::nextRow()
 
 1679  QMutexLocker lock( &mMutex );
 
 1680  const QVariantList row = nextRowPrivate();
 
 1681  if ( ! row.isEmpty() )
 
 1688bool QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator::hasNextRow()
 const 
 1690  QMutexLocker lock( &mMutex );
 
 1691  return hasNextRowPrivate();
 
 1694long long QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator::fetchedRowCount()
 
 1696  QMutexLocker lock( &mMutex );
 
 1697  return mFetchedRowCount;
 
 1700long long QgsAbstractDatabaseProviderConnection::QueryResult::QueryResultIterator::rowCount()
 
 1702  QMutexLocker lock( &mMutex );
 
 1703  return rowCountPrivate();
 
DatabaseProviderConnectionCapability2
The Capability enum represents the extended operations supported by the connection.
 
@ SetTableComment
Can set comments for tables via setTableComment()
 
@ SetFieldComment
Can set comments for fields via setFieldComment()
 
@ SetFieldAlias
Can set aliases for fields via setFieldAlias()
 
QFlags< RelationshipCapability > RelationshipCapabilities
Relationship capabilities.
 
QFlags< DatabaseProviderConnectionCapability2 > DatabaseProviderConnectionCapabilities2
 
WkbType
The WKB type describes the number of dimensions a geometry has.
 
QFlags< SqlLayerDefinitionCapability > SqlLayerDefinitionCapabilities
SQL layer definition capabilities.
 
virtual QString defaultGeometryColumnName() const
Returns the default name to use for a geometry column for the connection.
 
virtual void setFieldComment(const QString &fieldName, const QString &schema, const QString &tableName, const QString &comment) const
Sets the comment for the existing field with the specified name.
 
virtual QList< QgsWeakRelation > relationships(const QString &schema=QString(), const QString &tableName=QString()) const
Returns a list of relationships detected in the database.
 
virtual void createVectorTable(const QString &schema, const QString &name, const QgsFields &fields, Qgis::WkbType wkbType, const QgsCoordinateReferenceSystem &srs, bool overwrite, const QMap< QString, QVariant > *options) const
Creates an empty table with name in the given schema (schema is ignored if not supported by the backe...
 
virtual QgsVectorLayer * createSqlVectorLayer(const SqlVectorLayerOptions &options) const
Creates and returns a (possibly invalid) vector layer based on a SQL statement and options.
 
virtual bool tableExists(const QString &schema, const QString &name) const
Checks whether a table name exists in the given schema.
 
TableFlag
Flags for table properties.
 
QList< QgsAbstractDatabaseProviderConnection::TableProperty > tablesInt(const QString &schema=QString(), const int flags=0) const
Returns information on the tables in the given schema.
 
virtual void updateRelationship(const QgsWeakRelation &relationship) const
Updates an existing relationship in the database.
 
virtual void renameField(const QString &schema, const QString &tableName, const QString &name, const QString &newName) const
Renames an existing field.
 
virtual void dropSchema(const QString &name, bool force=false) const
Drops an entire schema with the specified name.
 
Qgis::SqlLayerDefinitionCapabilities mSqlLayerDefinitionCapabilities
 
virtual void addField(const QgsField &field, const QString &schema, const QString &tableName) const
Adds a field.
 
virtual QList< QgsAbstractDatabaseProviderConnection::TableProperty > tables(const QString &schema=QString(), const QgsAbstractDatabaseProviderConnection::TableFlags &flags=QgsAbstractDatabaseProviderConnection::TableFlags(), QgsFeedback *feedback=nullptr) const
Returns information on the tables in the given schema.
 
Qgis::DatabaseProviderConnectionCapabilities2 mCapabilities2
 
Capabilities mCapabilities
 
virtual void vacuum(const QString &schema, const QString &name) const
Vacuum the database table with given schema and name (schema is ignored if not supported by the backe...
 
QSet< QString > mIllegalFieldNames
 
virtual QList< Qgis::FieldDomainType > supportedFieldDomainTypes() const
Returns a list of field domain types which are supported by the provider.
 
virtual void renameVectorTable(const QString &schema, const QString &name, const QString &newName) const
Renames a vector or aspatial table with given schema (schema is ignored if not supported by the backe...
 
QString providerKey() const
Returns the provider key.
 
virtual void createSchema(const QString &name) const
Creates a new schema with the specified name.
 
virtual void deleteSpatialIndex(const QString &schema, const QString &name, const QString &geometryColumn) const
Deletes the existing spatial index for the database table with given schema, name and geometryColumn ...
 
virtual void dropRasterTable(const QString &schema, const QString &name) const
Drops a raster table with given schema (schema is ignored if not supported by the backend) and name.
 
Qgis::DatabaseProviderConnectionCapabilities2 capabilities2() const
Returns extended connection capabilities.
 
virtual QueryResult execSql(const QString &sql, QgsFeedback *feedback=nullptr) const
Executes raw sql and returns the (possibly empty) query results, optionally feedback can be provided.
 
virtual QgsProviderSqlQueryBuilder * queryBuilder() const
Returns a SQL query builder for the connection, which provides an interface for provider-specific cre...
 
virtual void setFieldDomainName(const QString &fieldName, const QString &schema, const QString &tableName, const QString &domainName) const
Sets the field domain name for the existing field with the specified name.
 
virtual void deleteField(const QString &fieldName, const QString &schema, const QString &tableName, bool force=false) const
Deletes the field with the specified name.
 
virtual QString tableUri(const QString &schema, const QString &name) const
Returns the URI string for the given table and schema.
 
QFlags< TableFlag > TableFlags
 
QFlags< GeometryColumnCapability > GeometryColumnCapabilities
 
virtual void deleteRelationship(const QgsWeakRelation &relationship) const
Deletes an existing relationship in the database.
 
Capability
The Capability enum represents the operations supported by the connection.
 
@ RetrieveFieldDomain
Can retrieve field domain details from provider via fieldDomain()
 
@ CreateSpatialIndex
The connection can create spatial indices.
 
@ AddRelationship
Can add new relationships to the database via addRelationship()
 
@ SqlLayers
Can create vector layers from SQL SELECT queries.
 
@ RenameSchema
Can RENAME a schema.
 
@ DropVectorTable
Can DROP a vector (or aspatial) table/layer.
 
@ DeleteSpatialIndex
The connection can delete spatial indices for tables.
 
@ RetrieveRelationships
Can retrieve relationships from the database.
 
@ RenameRasterTable
Can RENAME a raster table/layer.
 
@ SetFieldDomain
Can set the domain for an existing field via setFieldDomainName()
 
@ DropSchema
Can DROP a schema.
 
@ AddFieldDomain
Can add new field domains to the database via addFieldDomain()
 
@ DeleteRelationship
Can delete existing relationships from the database via deleteRelationship()
 
@ CreateSchema
Can CREATE a schema.
 
@ DropRasterTable
Can DROP a raster table/layer.
 
@ DeleteField
Can delete an existing field/column.
 
@ AddField
Can add a new field/column.
 
@ TableExists
Can check if table exists.
 
@ RenameVectorTable
Can RENAME a vector (or aspatial) table/layer.
 
@ RenameField
Can rename existing fields via renameField()
 
@ MoveTableToSchema
Can move table to another schema via moveTableToAnotherSchema()
 
@ ExecuteSql
Can execute raw SQL queries (without returning results)
 
@ UpdateRelationship
Can update existing relationships in the database via updateRelationship()
 
@ SpatialIndexExists
The connection can determine if a spatial index exists.
 
@ ListFieldDomains
Can return a list of field domain names via fieldDomainNames()
 
@ Schemas
Can list schemas (if not set, the connection does not support schemas)
 
virtual void createSpatialIndex(const QString &schema, const QString &name, const QgsAbstractDatabaseProviderConnection::SpatialIndexOptions &options=QgsAbstractDatabaseProviderConnection::SpatialIndexOptions()) const
Creates a spatial index for the database table with given schema and name (schema is ignored if not s...
 
virtual QStringList relatedTableTypes() const
Returns a list of the related table types supported by the database format.
 
GeometryColumnCapabilities mGeometryColumnCapabilities
 
virtual GeometryColumnCapabilities geometryColumnCapabilities()
Returns connection geometry column capabilities (Z, M, SinglePart, Curves).
 
virtual Qgis::SqlLayerDefinitionCapabilities sqlLayerDefinitionCapabilities()
Returns SQL layer definition capabilities (Filters, GeometryColumn, PrimaryKeys).
 
virtual void renameRasterTable(const QString &schema, const QString &name, const QString &newName) const
Renames a raster table with given schema (schema is ignored if not supported by the backend) and name...
 
virtual void dropVectorTable(const QString &schema, const QString &name) const
Drops a vector (or aspatial) table with given schema (schema is ignored if not supported by the backe...
 
virtual QStringList fieldDomainNames() const
Returns a list of field domain names present on the provider.
 
virtual void setFieldAlias(const QString &fieldName, const QString &schema, const QString &tableName, const QString &alias) const
Sets the alias for the existing field with the specified name.
 
virtual void renameSchema(const QString &name, const QString &newName) const
Renames a schema with the specified name.
 
virtual void addFieldDomain(const QgsFieldDomain &domain, const QString &schema) const
Adds a new field domain to the database.
 
virtual QList< QList< QVariant > > executeSql(const QString &sql, QgsFeedback *feedback=nullptr) const
Executes raw sql and returns the (possibly empty) list of results in a multi-dimensional array,...
 
virtual bool spatialIndexExists(const QString &schema, const QString &name, const QString &geometryColumn) const
Determines whether a spatial index exists for the database table with given schema,...
 
virtual QgsAbstractDatabaseProviderConnection::TableProperty table(const QString &schema, const QString &table, QgsFeedback *feedback=nullptr) const
Returns information on a table in the given schema.
 
virtual QMultiMap< Qgis::SqlKeywordCategory, QStringList > sqlDictionary()
Returns a dictionary of SQL keywords supported by the provider.
 
virtual Qgis::RelationshipCapabilities supportedRelationshipCapabilities() const
Returns the relationship capabilities supported by the provider.
 
virtual SqlVectorLayerOptions sqlOptions(const QString &layerSource)
Returns the SQL layer options from a layerSource.
 
QFlags< Capability > Capabilities
 
virtual QSet< QString > illegalFieldNames() const
Returns a list of field names which are considered illegal by the connection and should not be used w...
 
virtual QStringList schemas() const
Returns information about the existing schemas.
 
virtual QList< Qgis::RelationshipCardinality > supportedRelationshipCardinalities() const
Returns a list of relationship cardinalities which are supported by the provider.
 
virtual QString createVectorLayerExporterDestinationUri(const QgsAbstractDatabaseProviderConnection::VectorLayerExporterOptions &options, QVariantMap &providerOptions) const
Creates a URI for use with QgsVectorLayerExporter corresponding to given destination table options fo...
 
virtual void moveTableToSchema(const QString &sourceSchema, const QString &tableName, const QString &targetSchema) const
Move table to a different schema.
 
virtual QList< Qgis::RelationshipStrength > supportedRelationshipStrengths() const
Returns a list of relationship strengths which are supported by the provider.
 
virtual QList< QgsLayerMetadataProviderResult > searchLayerMetadata(const QgsMetadataSearchContext &searchContext, const QString &searchString=QString(), const QgsRectangle &geographicExtent=QgsRectangle(), QgsFeedback *feedback=nullptr) const
Search the stored layer metadata in the connection, optionally limiting the search to the metadata id...
 
virtual void addRelationship(const QgsWeakRelation &relationship) const
Adds a new field relationship to the database.
 
virtual QgsFieldDomain * fieldDomain(const QString &name) const
Returns the field domain with the specified name from the provider.
 
QgsAbstractDatabaseProviderConnection(const QString &name)
Creates a new connection with name by reading its configuration from the settings.
 
virtual void setTableComment(const QString &schema, const QString &tableName, const QString &comment) const
Sets the comment for the existing table with the specified name.
 
virtual QString defaultPrimaryKeyColumnName() const
Returns the default name to use for a primary key column for the connection.
 
virtual bool validateSqlVectorLayer(const SqlVectorLayerOptions &options, QString &message) const
Validates the SQL query options to determine if it is possible to create a vector layer based on a SQ...
 
Capabilities capabilities() const
Returns connection capabilities.
 
virtual QgsFields fields(const QString &schema, const QString &table, QgsFeedback *feedback=nullptr) const
Returns the fields of a table and schema.
 
An interface for data provider connections.
 
Represents a coordinate reference system (CRS).
 
Base class for feedback objects to be used for cancellation of something running in a worker thread.
 
bool isCanceled() const
Tells whether the operation has been canceled already.
 
Base class for field domains.
 
Encapsulate a field in an attribute table or data source.
 
Container of fields for a vector layer.
 
Custom exception class which is raised when an operation is not supported.
 
Custom exception class for provider connection related exceptions.
 
Provides an interface for provider-specific creation of SQL queries.
 
A rectangle specified with double values.
 
Represents a vector layer which manages a vector based dataset.
 
Represent a QgsRelation with possibly unresolved layers or unmatched fields.
 
static Q_INVOKABLE int coordDimensions(Qgis::WkbType type)
Returns the coordinate dimension of the geometry type as an integer.
 
@ UnknownCount
Provider returned an unknown feature count.
 
QString qgsEnumValueToKey(const T &value, bool *returnOk=nullptr)
Returns the value for the given key of an enum.
 
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.
 
QList< QVariant > nextRow() const
Returns the next result row or an empty row if there are no rows left.
 
long long rowCount() const
Returns the number of rows returned by a SELECT query or Qgis::FeatureCountState::UnknownCount if unk...
 
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.
 
QString geometryColumn() const
Returns the geometry column name.
 
bool operator==(const QgsAbstractDatabaseProviderConnection::TableProperty &other) const
 
void setPrimaryKeyColumns(const QStringList &primaryKeyColumns)
Sets the primary key column names to primaryKeyColumns.
 
void setFlag(const TableFlag &flag)
Sets a flag.
 
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.
 
QString tableName() const
Returns the table name.
 
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.
 
void setSchema(const QString &schema)
Sets the schema.
 
QVariantMap info() const
Returns additional information about the table.
 
QString comment() const
Returns the table comment.
 
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.
 
TableFlags flags() const
Returns the table flags.
 
void setGeometryColumnCount(int geometryColumnCount)
Sets the geometryColumnCount.
 
void setFlags(const TableFlags &flags)
Sets the table flags.
 
void addGeometryColumnType(Qgis::WkbType type, const QgsCoordinateReferenceSystem &crs)
Appends the geometry column type with the given srid to the geometry column types list.
 
Stores all information required to create a QgsVectorLayerExporter for the backend.
 
Setting options for loading vector layers.
 
bool skipCrsValidation
Controls whether the layer is allowed to have an invalid/unknown CRS.