Qore MysqlSqlUtil Module Reference 1.5
Loading...
Searching...
No Matches
MysqlSqlUtil.qm.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* MysqlSqlUtil.qm Copyright 2013 - 2024 Qore Technologies, s.r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23*/
24
25// minimum required Qore version
26
27// requires the SqlUtil module
28
29// don't use "$" signs for variables and class members, assume local variable scope
30
31// require type definitions everywhere
32
33// enable all warnings
34
35
184namespace MysqlSqlUtil {
186 MysqlTable get_table(AbstractDatasource nds, string nname, *hash opts);
187
188
190 MysqlDatabase get_database(AbstractDatasource nds, *hash opts);
191
192
193 parse_schema_name(string nname, reference<*string> schema, reference<string> name);
194
195
197class MysqlSavepointHelper : public AbstractSavepointHelper {
198
199public:
201 constructor(AbstractDatasource ds, *string savepoint) ;
202
203
205protected:
207public:
208
209
211protected:
213public:
214
215
217protected:
219public:
220
221 };
222
225
226public:
228 constructor(string native_type, bool nullable, *hash<auto> options) ;
229
230 };
231
234
235public:
236 string type;
237
239 constructor(string n_name, bool n_unique, hash n_cols, string n_type = 'BTREE') ;
240
241
243 string getCreateSql(string table_name, *hash opt);
244
245
247protected:
248 bool equalImpl(AbstractIndex ix);
249public:
250
251
253 string getRenameSql(string table_name, string new_name);
254
255
257 string getDropSql(string table_name);
258
259 };
260
263
264public:
265 constructor(string n, Columns c, ForeignConstraintTarget t) ;
266
267
268 string getCreateSql(string table_name, *hash opt);
269
270
272 softlist getRenameSql(string table_name, string new_name);
273
274
275 string getCreateSql(string name, string table_name, *hash opt);
276
277
278 string getAddSql(string name, string table_name, *hash opt);
279
280
282 string getDropSql(string table_name);
283
284 };
285
288
289public:
292
294protected:
296public:
297
298
299 constructor(string n, string nt, *string qt, int sz, bool nul, *string dv, *string cm, *softint bs, *int scale) ;
300
301
303
310 softlist<string> getAddColumnSql(AbstractTable t);
311
312
314 string getCreateSql(AbstractTable t);
315
316
318
334 softlist<string> getModifySqlImpl(AbstractTable t, AbstractColumn col, *hash opt);
335
336
338
348 string getRenameSql(AbstractTable t, string new_name);
349
350
352
354 string getDdlName(string name);
355
356
358protected:
359 bool equalImpl(AbstractColumn c);
360public:
361
362 };
363
366
367public:
368 bool unsigned;
369 bool auto_increment;
370 // auto-incrememnt columns must be either "unique" or "primary key" in mysql
371 bool pk = False;
372
373protected:
374 // AUTO_INCREMENT applies only to integer and floating-point types
375 const AUTO_INCREMENT_VALID_TYPES = ...;
376
377
378public:
379
380 constructor(string n, string nt, *string qt, int sz, bool nul, *string dv, *string cm, softint bs, softint scale, bool n_unsigned = False, bool n_auto_increment = False, bool n_pk = False)
381 ;
382
383
385private:
386 deserializeMembers(hash<auto> members);
387public:
388
389
390protected:
391 validateConstructor();
392public:
393
394
395 string getNativeTypeString();
396
397
399protected:
400 bool equalImpl(AbstractColumn c);
401public:
402
403 };
404
405class MysqlUniqueConstraintCommon : public SqlUtil::AbstractUniqueConstraint {
406
407public:
408 constructor();
409
410
411 bool setIndexBase(string ix);
412
413
415 clearIndex();
416
417
419 getIndexSql(reference<string> sql, string name, *hash opts);
420
421 };
422
423class MysqlUniqueConstraint : public SqlUtil::AbstractUniqueConstraint, public MysqlUniqueConstraintCommon {
424
425public:
426 constructor(string n, hash n_cols) ;
427
428
430
445 MysqlColumn memberGate(string k);
446
447
448 string getCreateSql(string table_name, *hash opts);
449
450
451 list getRenameSql(string table_name, string new_name);
452
453
454 string getCreateSql(string name, string table_name, *hash opts);
455
456
458 string getDropSql(string table_name);
459
460 };
461
463class MysqlPrimaryKey : public SqlUtil::AbstractPrimaryKey, public MysqlUniqueConstraintCommon {
464
465public:
466 constructor();
467
468
469 constructor(*hash c) ;
470
471
473
489
490
491 string getCreateSql(string table_name, *hash opts);
492
493
495 softlist getRenameSql(string table_name, string new_name);
496
497
499 string getDropSql(string table_name);
500
501
504
505 };
506
509
510public:
512 constructor(string n, string n_src) ;
513
514
516 softlist getCreateSql(string table_name, *hash opt);
517
518
520 softlist getDropSql(string table_name);
521
522
524protected:
525 bool equalImpl(AbstractFunctionBase t);
526public:
527
528
530 softlist getRenameSql(string table_name, string new_name);
531
532 };
533
536
537public:
538 constructor(string n, string n_src) ;
539
540
542 softlist getCreateSql(*hash opt);
543
544
546
548 string getDropSql(*hash opt);
549
550
552protected:
553 bool equalImpl(AbstractFunctionBase t);
554public:
555
556
558
561 softlist getRenameSql(string new_name, *hash opt);
562
563 };
564
567
568public:
569protected:
570 string table_name;
571
572public:
573
575 constructor(string n_table_name, string n_name, number n_start = 1, number n_increment = 1, *softnumber n_end) ;
576
577
579 string getCreateSql(*hash opt);
580
581
583
586 softlist getRenameSql(string new_name, *hash opt);
587
588
590
592 string getDropSql(*hash opt);
593
594 };
595
598
599public:
603 *string checkoption;
605 *string definer;
608
610 constructor(string n_name, string n_src, *string n_tablecatalog, *string n_schema, *string n_checkoption, *string n_definer, *string n_securitytype, bool n_updatable)
611 ;
612
613
615 string getCreateSql(*hash opt);
616
617
619
622 softlist getRenameSql(string new_name, *hash opt);
623
624 };
625
628
629public:
631 const MysqlOptions = ...;
632
633
635 const MysqlSchemaDescriptionOptions = AbstractDatabase::SchemaDescriptionOptions + MysqlOptions;
636
638 const MysqlDatabaseOptions = AbstractDatabase::DatabaseOptions + MysqlOptions;
639
642
643
645 const MysqlSequenceFunction = "%s(seq_name varchar(40)) returns decimal(14) begin update %s set id = last_insert_id(id + 1) where name = seq_name;
646 return last_insert_id();
647end";
648
651
652
655
656
659
660
663
664protected:
665 string schema;
666
668 Datasource seqds;
669
670 string sequence_table = "sqlutil_sequences";
671 string sequence_function = "sqlutil_nextval";
672
673public:
674
675 constructor(AbstractDatasource nds, *hash opts) ;
676
677
679
684
685
687
692
693
694protected:
695 list<string> featuresImpl();
696public:
697
698
699 string getSchemaName();
700
701
702protected:
703 AbstractSequence makeSequenceImpl(string name, number start = 1, number increment = 1, *softnumber end, *hash opts);
704public:
705
706
707protected:
708 *AbstractSequence getSequenceImpl(string name);
709public:
710
711
712protected:
713 *AbstractView getViewImpl(string name);
714public:
715
716
717protected:
718 MysqlFunction makeFunctionImpl(string name, string src, *hash opts);
719public:
720
721
722protected:
723 MysqlFunction makeProcedureImpl(string name, string src, *hash opts);
724public:
725
726
727protected:
728 *AbstractFunction getFunctionImpl(string name);
729public:
730
731
732protected:
733 static string makeParameter(hash<auto> row);
734public:
735
736
737protected:
738 AbstractFunction getProcedureImpl(string name);
739public:
740
741
742protected:
743 list getDropSchemaSqlImpl(hash schema_hash, *hash opt);
744public:
745
746
747protected:
748 list getAlignSqlImpl(hash schema_hash, *hash opt);
749public:
750
751
753protected:
754 list<string> listTablesImpl();
755public:
756
757
759
763protected:
764 list<string> listFunctionsImpl();
765public:
766
767
769
773protected:
774 list<string> listProceduresImpl();
775public:
776
777
778protected:
779 list<string> listSequencesImpl();
780public:
781
782
783protected:
784 list<string> listViewsImpl();
785public:
786
787
788protected:
789 string getCreateSqlImpl(list l);
790public:
791
792
793 static string getCreateSql(list l);
794
796protected:
798public:
799
800
802protected:
804public:
805
806
808protected:
810public:
811
812
814protected:
816public:
817
818
820protected:
821 softint getNextSequenceValueImpl(string name);
822public:
823
824
826protected:
827 softint getCurrentSequenceValueImpl(string name);
828public:
829
830
832protected:
834public:
835
836
838protected:
840public:
841
842
844protected:
846public:
847
848
850protected:
851 bool rebuildIndexImpl(string name, *hash options);
852public:
853
854
856protected:
857 computeStatisticsImpl(*hash options);
858public:
859
860
862protected:
863 reclaimSpaceImpl(*hash options);
864public:
865
866
868protected:
870public:
871
872 };
873
876
877public:
879 const MysqlTypeMap = ...;
880
881
883 const QoreTypeMap = ...;
884
885
887
895
896
898
904
905
906 const MysqlIndexOptions = AbstractTable::IndexOptions;
907
908 const MysqlConstraintOptions = ...;
909
910
911 const MysqlTableCreationOptions = AbstractTable::TableCreationOptions + MysqlConstraintOptions;
912
913 const MysqlAlignTableOptions = AbstractTable::AlignTableOptions + MysqlTableCreationOptions;
914
916 const MysqlCopMap = ...;
917
918
921
922
924 const MysqlOpMap = ...;
925
926
928 const MysqlTruncDate = ...;
929
930
931protected:
932 string schema;
933 string engine = "innodb";
934 string collation;
935 string table_encoding;
936
937public:
938
939 constructor(AbstractDatasource nds, string nname, *hash opts) ;
940
941
943 string getSqlName();
944
945
947 hash<auto> getExpressionMap();
948
949
952
953
954protected:
955 hash getTableCreationOptions();
956public:
957
958
959protected:
960 hash getTableDescriptionHashOptions();
961public:
962
963
964protected:
965 hash getColumnDescOptions();
966public:
967
968
969protected:
970 hash getIndexOptions();
971public:
972
973
974protected:
975 hash getConstraintOptions();
976public:
977
978
979protected:
980 hash getAlignTableOptions();
981public:
982
983
985protected:
987public:
988
989
990protected:
991 bool checkExistenceImpl();
992public:
993
994
995protected:
996 Columns describeImpl();
997public:
998
999
1000protected:
1001 *string getCreatePrimaryKeySqlUnlocked(*hash opt, bool cache = True);
1002public:
1003
1004
1005protected:
1006 MysqlPrimaryKey getPrimaryKeyImpl();
1007public:
1008
1009
1010protected:
1011 Indexes getIndexesImpl();
1012public:
1013
1014
1015protected:
1016 ForeignConstraints getForeignConstraintsImpl(*hash opts);
1017public:
1018
1019
1020protected:
1021 Constraints getConstraintsImpl();
1022public:
1023
1024
1025protected:
1026 Triggers getTriggersImpl();
1027public:
1028
1029
1030 string getCreateTableSqlImpl(*hash opt);
1031
1032
1035
1036
1037protected:
1038 *list getCreateMiscSqlImpl(*hash opt, bool cache);
1039public:
1040
1041
1042protected:
1043 *list getAlignSqlImpl(AbstractTable table, *hash opt);
1044public:
1045
1046
1047protected:
1048 string getCreateSqlImpl(list l);
1049public:
1050
1051
1052protected:
1053 string getRenameSqlImpl(string new_name);
1054public:
1055
1056
1057protected:
1058 AbstractColumn addColumnImpl(string cname, hash<auto> opt, bool nullable = True);
1059public:
1060
1061
1062protected:
1063 setPrimaryKeyUnlocked(AbstractPrimaryKey pk);
1064public:
1065
1066
1067protected:
1068 addColumnToTableUnlocked(AbstractColumn c);
1069public:
1070
1071
1072protected:
1073 AbstractPrimaryKey addPrimaryKeyImpl(string cname, hash ch, *hash opt);
1074public:
1075
1076
1077protected:
1078 AbstractIndex addIndexImpl(string iname, bool enabled, hash ch, *hash opt);
1079public:
1080
1081
1082protected:
1083 AbstractForeignConstraint addForeignConstraintImpl(string cname, hash ch, string table, hash tch, *hash opt);
1084public:
1085
1086
1087protected:
1088 AbstractCheckConstraint addCheckConstraintImpl(string cname, string src, *hash opt);
1089public:
1090
1091
1092protected:
1093 AbstractUniqueConstraint addUniqueConstraintImpl(string cname, hash ch, *hash opt);
1094public:
1095
1096
1097protected:
1098 AbstractTrigger addTriggerImpl(string tname, string src, *hash opt);
1099public:
1100
1101
1102protected:
1103 bool tryInsertImpl(string sql, hash<auto> row);
1104public:
1105
1106
1108
1110protected:
1111 bool isDuplicateRowErrorImpl(hash<ExceptionInfo> ex);
1112public:
1113
1114
1115protected:
1116 hash getQoreTypeMapImpl();
1117public:
1118
1119
1120protected:
1121 hash getTypeMapImpl();
1122public:
1123
1124
1126protected:
1127 *string getSqlValueImpl(auto v);
1128public:
1129
1130
1132protected:
1133 static *string getSqlValueIntern(auto v);
1134public:
1135
1136
1138
1140 string getColumnSqlName(string col);
1141
1142
1144 list getColumnSqlNames(softlist cols);
1145
1146
1148
1159 static *string getSqlValue(auto v);
1160
1161protected:
1162 bool emptyImpl();
1163public:
1164
1165
1166protected:
1167 preSetupTableImpl(reference<hash> desc, *hash opt);
1168public:
1169
1170
1171protected:
1172 setupTableImpl(hash desc, *hash opt);
1173public:
1174
1175
1177protected:
1179public:
1180
1181
1183protected:
1185public:
1186
1187
1189protected:
1191public:
1192
1193
1195protected:
1196 doSelectLimitOnlyInternImpl(reference<hash<QueryInfo>> info, reference<string> sql);
1197public:
1198
1199
1201protected:
1202 doSelectOrderByWithOffsetSqlInternImpl(reference<hash<QueryInfo>> info, reference<string> sql, list<auto> coll);
1203public:
1204
1205
1207protected:
1209public:
1210
1211
1212protected:
1213 *hash<auto> doReturningImpl(hash<auto> opt, reference<string> sql, list<auto> args);
1214public:
1215
1216
1217protected:
1218 list<auto> getGroupOrderByListUnlocked(hash<QueryInfo> info, string key, list<auto> coll);
1219public:
1220
1221
1224
1225
1227protected:
1228 copyImpl(AbstractTable old);
1229public:
1230
1231
1233protected:
1234 AbstractDataProviderType getNumericTypeImpl(string native_type, bool nullable, *hash<auto> options);
1235public:
1236
1237
1239
1243protected:
1244 AbstractSavepointHelper getSavepointHelperImpl(*string savepoint);
1245public:
1246
1247 };
1248};
represents a MySQL-specific column
Definition MysqlSqlUtil.qm.dox.h:287
softlist< string > getAddColumnSql(AbstractTable t)
returns a list of sql strings that can be used to add the column to an existing table
softlist< string > getModifySqlImpl(AbstractTable t, AbstractColumn col, *hash opt)
returns a list of sql strings that can be used to modify the column to the new definition
string getCreateSql(AbstractTable t)
returns an sql string that can be used to add the column to a table
constructor()
empty constructor for subclasses
string getRenameSql(AbstractTable t, string new_name)
returns a string that can be used to rename the column
int byte_size
byte size of the column
Definition MysqlSqlUtil.qm.dox.h:291
string getDdlName(string name)
returns the column name with quoting in case the column name is a reserved word
bool equalImpl(AbstractColumn c)
returns True if the argument is equal to the current object, False if not
provides the MySQL-specific implementation of the AbstractDatabase interface
Definition MysqlSqlUtil.qm.dox.h:627
bool rebuildIndexImpl(string name, *hash options)
rebuild index implementation. See SqlUtil::AbstractDatabase::rebuildIndex()
const MysqlSequenceTable
MySQL sequence emulation table.
Definition MysqlSqlUtil.qm.dox.h:641
const MysqlComputeStatisticsOptions
Options for computeStatistics()
Definition MysqlSqlUtil.qm.dox.h:650
const MysqlSchemaDescriptionOptions
MySQL-specific schema description keys.
Definition MysqlSqlUtil.qm.dox.h:635
bool requiresScale()
Returns True if the driver requires a scale to support decimal values in numeric or decimal columns.
Datasource seqds
separate datasource dedicated for extern sequence implementation with autonomous transactions
Definition MysqlSqlUtil.qm.dox.h:668
list< string > listProceduresImpl()
returns a list of string procedure names in the database
int getMaximumPrecision()
Returns the maximum precision for numeric or decimal columns.
softint getNextSequenceValueImpl(string name)
returns the next value in the given sequence
const MysqlMaxPrecision
Maximum precision.
Definition MysqlSqlUtil.qm.dox.h:662
bool supportsPackagesImpl()
returns True if the database supports packages
hash getSchemaDescriptionOptions()
returns driver-specific options to the base abstract class
int getPhysicalSizeImpl()
SqlUtil::AbstractDatabase::getPhysicalSize()
const MysqlReclaimSpaceOptions
Options for reclaimSpace()
Definition MysqlSqlUtil.qm.dox.h:654
const MysqlReservedWords
hash of reserved words
Definition MysqlSqlUtil.qm.dox.h:658
computeStatisticsImpl(*hash options)
compute statistics implementation. See SqlUtil::AbstractDatabase::computeStatistics()
hash getDatabaseOptions()
returns driver-specific options to the base abstract class
const MysqlSequenceFunction
MySQL sequence function.
Definition MysqlSqlUtil.qm.dox.h:645
reclaimSpaceImpl(*hash options)
reclaim space implementation. See SqlUtil::AbstractDatabase::reclaimSpace()
softint getCurrentSequenceValueImpl(string name)
returns the last value issued for the given sequence in the current session
list< string > listFunctionsImpl()
returns a list of string function names in the database
hash getReclaimSpaceOptions()
returns driver-specific options to the base abstract class
bool supportsTypesImpl()
returns True if the database supports named types
list< string > listTablesImpl()
returns a list of string table names in the database
hash getComputeStatisticsOptions()
returns driver-specific options to the base abstract class
bool supportsSequencesImpl()
returns True since we have a workaround implementation for sequences in MySQL
const MysqlOptions
MySQL-specific options.
Definition MysqlSqlUtil.qm.dox.h:631
const MysqlDatabaseOptions
MySQL-specific database options.
Definition MysqlSqlUtil.qm.dox.h:638
represents a MySQL-specific foreign constraint
Definition MysqlSqlUtil.qm.dox.h:262
string getDropSql(string table_name)
returns a string that can be used to drop the foreign constraint from the database
softlist getRenameSql(string table_name, string new_name)
returns a string that drops the constraint and re-adds it, since MySQL does not support renaming cons...
represents a MySQL-specific function
Definition MysqlSqlUtil.qm.dox.h:535
softlist getCreateSql(*hash opt)
returns a string that can be used to create the function in the database
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
string getDropSql(*hash opt)
returns a string that can be used to drop the function from the database
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the function in the database
represents a MySQL-specific index
Definition MysqlSqlUtil.qm.dox.h:233
constructor(string n_name, bool n_unique, hash n_cols, string n_type='BTREE')
creates the object from the arguments
string getDropSql(string table_name)
returns a string that can be used to drop the index from the table
string getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the index in the database
string getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the index in the database; hwoever mysql does not support...
bool equalImpl(AbstractIndex ix)
returns True if the argument is equal to the current index, False if not
the data type for DECIMAL columns
Definition MysqlSqlUtil.qm.dox.h:224
constructor(string native_type, bool nullable, *hash< auto > options)
creates the object
represents a MySQL-specific numeric column
Definition MysqlSqlUtil.qm.dox.h:365
bool equalImpl(AbstractColumn c)
returns True if the argument is equal to the current object, False if not
deserializeMembers(hash< auto > members)
deserializes the hash to a replica of the original object
represents a MySQL-specific primary key constraint
Definition MysqlSqlUtil.qm.dox.h:463
MysqlColumn memberGate(string k)
returns the MysqlColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception
string getDropSql(string table_name)
returns a string that can be used to drop the constraint from the database
bool supportsName()
returns False since primary key constraints in MySQL have no name
softlist getRenameSql(string table_name, string new_name)
primary keys have no name in MySQL so this method returns an empty list
MySQL savepoint helper.
Definition MysqlSqlUtil.qm.dox.h:197
deleteSavepointImpl()
Deletes the savepoint.
createSavepointImpl()
Creates the savepoint.
constructor(AbstractDatasource ds, *string savepoint)
Creates the object.
rollbackImpl()
Rolls back to the savepoint.
class for MySQL sequences based on a sequence table and autonomous transactions
Definition MysqlSqlUtil.qm.dox.h:566
string getCreateSql(*hash opt)
returns a string that can be used to create the sequence in the database
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the sequence in the database
string getDropSql(*hash opt)
returns a string that can be used to drop the sequence from the database
constructor(string n_table_name, string n_name, number n_start=1, number n_increment=1, *softnumber n_end)
creates the object from the arguments
provides the MySQL-specific implementation of the AbstractTable interface
Definition MysqlSqlUtil.qm.dox.h:875
hash< auto > getExpressionMap()
Returns the expression map for MySQL.
bool isDuplicateRowErrorImpl(hash< ExceptionInfo > ex)
Returns True if the exception was raised because of a duplicate row / key error.
hash< auto > getWhereOperatorMap()
returns the "where" operator map for MySQL
bool hasReturningImpl()
returns True if the current driver supports the "returning" clause in insert statements
list getColumnSqlNames(softlist cols)
returns a list of column names for use in SQL strings; subclasses can process the argument list in ca...
string getColumnSqlName(string col)
returns the column name for use in SQL strings; subclasses can return a special string in case the co...
const QoreTypeMap
maps qore type names to MySQL type names
Definition MysqlSqlUtil.qm.dox.h:883
bool constraintsLinkedToIndexesImpl()
returns True if the database links constraints to indexes (ie dropping the constraint drops the index...
const MysqlTypeMap
maps mysql type names to type configurations
Definition MysqlSqlUtil.qm.dox.h:879
bool supportsTablespacesImpl()
returns True if the database support tablespaces
AbstractDataProviderType getNumericTypeImpl(string native_type, bool nullable, *hash< auto > options)
returns the type for number / numeric columns for the database so that data conversions can be handle...
doSelectOrderByWithOffsetSqlInternImpl(reference< hash< QueryInfo > > info, reference< string > sql, list< auto > coll)
processes a string for use in SQL select statements when there is an "order by" and "offset" argument
hash getColumnOperatorMapImpl()
returns the column operator map for this object
bool asteriskRequiresPrefix()
returns True if the database requires a wildcard "*" to be prefixed with the table name when it appea...
string getSqlName()
returns the name of the table to be used in SQL (with a possible qualifiers for schema,...
static *string getSqlValue(auto v)
returns a string for use in SQL queries representing the DB-specific value of the argument
bool hasArrayBind()
returns False because the mysql driver does not support array binds / bulk DML operations
const MysqlOpMap
where operator specializations for MySQL
Definition MysqlSqlUtil.qm.dox.h:924
const MysqlTableDescriptionHashOptions
extends SqlUtil::AbstractTable::TableDescriptionHashOptions
Definition MysqlSqlUtil.qm.dox.h:894
const MysqlExpressionMap
MySQL Expression map.
Definition MysqlSqlUtil.qm.dox.h:920
const MysqlTruncDate
Map SqlUtil::cop_trunc_date() constants for internal masks.
Definition MysqlSqlUtil.qm.dox.h:928
const MysqlCopMap
column operator specializations for MySQL
Definition MysqlSqlUtil.qm.dox.h:916
const MysqlColumnDescOptions
extends SqlUtil::AbstractTable::ColumnDescOptions with MySQL-specific values
Definition MysqlSqlUtil.qm.dox.h:903
doSelectLimitOnlyInternImpl(reference< hash< QueryInfo > > info, reference< string > sql)
processes a string for use in SQL select statements when there is a "limit" argument,...
static *string getSqlValueIntern(auto v)
returns a string for use in SQL queries representing the DB-specific value of the argument; returns N...
copyImpl(AbstractTable old)
db-specific copy actions
AbstractSavepointHelper getSavepointHelperImpl(*string savepoint)
get DB-specific savepoint helper
bool uniqueIndexCreatesConstraintImpl()
returns True if the database automatically creates a unique constraint when a unique index is created...
*string getSqlValueImpl(auto v)
returns a string for use in SQL queries representing the DB-specific value of the argument; returns N...
represents a MySQL-specific trigger
Definition MysqlSqlUtil.qm.dox.h:508
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
softlist getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the trigger in the database
constructor(string n, string n_src)
creates the object and sets its name and the trigger source
softlist getDropSql(string table_name)
returns a string that can be used to drop the trigger from the database
softlist getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the trigger in the database
represents a MySQL view
Definition MysqlSqlUtil.qm.dox.h:597
constructor(string n_name, string n_src, *string n_tablecatalog, *string n_schema, *string n_checkoption, *string n_definer, *string n_securitytype, bool n_updatable)
creates the object from the arguments
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the view in the database
string getCreateSql(*hash opt)
returns a string that can be used to create the view in the database
*string tablecatalog
table catalog value
Definition MysqlSqlUtil.qm.dox.h:601
*string definer
dafiner clause
Definition MysqlSqlUtil.qm.dox.h:605
*string checkoption
checkoption clause
Definition MysqlSqlUtil.qm.dox.h:603
*string securitytype
security type value
Definition MysqlSqlUtil.qm.dox.h:607
cache(*hash< auto > opts)
the MysqlSqlUtil namespace contains all the objects in the MysqlSqlUtil module
Definition MysqlSqlUtil.qm.dox.h:184
MysqlDatabase get_database(AbstractDatasource nds, *hash opts)
returns a MysqlDatabase object corresponding to the arguments
MysqlTable get_table(AbstractDatasource nds, string nname, *hash opts)
returns a MysqlTable object corresponding to the arguments