Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MySQLDatabaseMetaData.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MySQLDatabaseMetaData.cxx
1 // $Id: MySQLDatabaseMetaData.cxx,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
2 //*-- Author : Valeriy Onuchin 26/02/2001
3 //
4 // RDBC driver to MySQL database implemented with MySQL C API.
5 //
6 // ++ The code consists of some parts stolen from mm JDBC and
7 // MyODBC ODBC drivers and other mysql-related open sources.
8 //
9 
11 //
12 // Comprehensive information about the database as a whole.
13 //
14 // Many of the methods here return lists of information in the form
15 // of TSQLResultSet objects. You can use the normal TSQLResultSet
16 // methods such as TSQLResultSet::GetString() and
17 // TSQLResultSet::GetInt() to retrieve the data from
18 // these TSQLResultSet s. If a given form of metadata is not available,
19 // these methods should throw an TSQLException.
20 //
21 // Some of these methods take arguments that are string patterns.
22 // These arguments all have names such as fooPattern. Within a
23 // pattern string, "%" means match any substring of 0 or more
24 // characters, and "_" means match any one character. Only metadata
25 // entries matching the search pattern are returned. If a search
26 // pattern argument is set to a null ref, that argument's criteria
27 // will be dropped from the search.
28 //
29 //
31 //
32 // Constants:
33 //
34 //___________________________________________________________________
35 // kProcedureResultUnknown
36 //
37 // A possible value for column PROCEDURE_TYPE in the
38 // TSQLResultSet object returned by the method GetProcedures().
39 //
40 // Indicates that it is not known whether the procedure
41 // returns a result.
42 //
43 //___________________________________________________________________
44 // kProcedureNoResult
45 //
46 // A possible value for column PROCEDURE_TYPE in the
47 // TSQLResultSet object returned by the method GetProcedures().
48 //
49 // Indicates that the procedure does not return a result.
50 //
51 //___________________________________________________________________
52 // kProcedureReturnsResult
53 //
54 // A possible value for column PROCEDURE_TYPE in the
55 // TSQLResultSet object returned by the method GetProcedures().
56 //
57 // Indicates that the procedure returns a result.
58 //
59 //___________________________________________________________________
60 // kProcedureColumnUnknown
61 //
62 // Indicates that type of the column is unknown. A possible value
63 // for the column COLUMN_TYPE in the TSQLResultSet returned by
64 // the method GetProcedureColumns().
65 //
66 //___________________________________________________________________
67 // kProcedureColumnIn
68 //
69 // Indicates that the column stores IN parameters. A possible
70 // value for the column COLUMN_TYPE in the TSLQResultSet returned
71 // by the method GetProcedureColumns().
72 //
73 //___________________________________________________________________
74 // kProcedureColumnInOut
75 //
76 // Indicates that the column stores INOUT parameters. A possible
77 // value for the column COLUMN_TYPE in the TSQLResultSet returned
78 // by the method GetProcedureColumns().
79 //
80 //___________________________________________________________________
81 // kProcedureColumnOut
82 //
83 // Indicates that the column stores OUT parameters. A possible
84 // value for the column kCOLUMN_TYPE in the TSQLResultSet
85 // returned by the method GetProcedureColumns().
86 //
87 //___________________________________________________________________
88 // kProcedureColumnReturn
89 //
90 // Indicates that the column stores return values. A possible
91 // value for the column COLUMN_TYPE in the TSQLResultSet returned
92 // by the method GetProcedureColumns().
93 //
94 //___________________________________________________________________
95 // kProcedureColumnResult
96 //
97 // Indicates that the column stores results. A possible value
98 // for the column kCOLUMN_TYPE in the TSQLResultSet returned
99 // by the method GetProcedureColumns().
100 //
101 //___________________________________________________________________
102 // kProcedureNoNulls
103 //
104 // Indicates that NULL values are not allowed. A possible value
105 // for the column NULLABLE in the TSQLResultSet returned by the
106 // method GetProcedureColumns().
107 //
108 //___________________________________________________________________
109 // kProcedureNullable
110 //
111 // Indicates that NULL values are allowed. A possible value for
112 // the column NULLABLE in the TSQLResultSet returned by
113 // the method GetProcedureColumns().
114 //
115 //___________________________________________________________________
116 // kProcedureNullableUnknown
117 //
118 // Indicates that whether NULL values are allowed is unknown.
119 // A possible value for the column NULLABLE in the TSQLResultSet
120 // returned by the method GetProcedureColumns().
121 //
122 //___________________________________________________________________
123 // kColumnNoNulls
124 //
125 // Indicates that the column might not allow NULL values.
126 // A possible value for the column NULLABLE in the TSQLResultSet
127 // returned by the method GetColumns().
128 //
129 //___________________________________________________________________
130 // kColumnNullable
131 //
132 // Indicates that the column definitely allows NULL values.
133 // A possible value for the column NULLABLE in the TSQLResultSet
134 // returned by the method GetColumns().
135 //
136 //___________________________________________________________________
137 // kColumnNullableUnknown
138 //
139 // Indicates that the nullability of columns is unknown.
140 // A possible value for the column NULLABLE in the TSQLResultSet
141 // returned by the method GetColumns().
142 //
143 //___________________________________________________________________
144 // kBestRowTemporary
145 //
146 // Indicates that the scope of the best row identifier is very
147 // temporary, lasting only while the row is being used.
148 // A possible value for the column SCOPE in the TSQLResultSet
149 // object returned by the method GetBestRowIdentifier().
150 //
151 //___________________________________________________________________
152 // kBestRowTransaction
153 //
154 // Indicates that the scope of the best row identifier is the
155 // remainder of the current transaction. A possible value for
156 // the column SCOPE in the TSQLResultSet object returned by
157 // the method GetBestRowIdentifier().
158 //
159 //___________________________________________________________________
160 // kBestRowSession
161 //
162 // Indicates that the scope of the best row identifier is the
163 // remainder of the current session. A possible value for the
164 // column SCOPE in the TSQLResultSet object returned by
165 // the method GetBestRowIdentifier().
166 //
167 //___________________________________________________________________
168 // kBestRowUnknown
169 //
170 // Indicates that the best row identifier may or may not be
171 // a pseudo column. A possible value for the column
172 // PSEUDO_COLUMN in the TSQLResultSet object returned by
173 // the method GetBestRowIdentifier().
174 //
175 //___________________________________________________________________
176 // kBestRowNotPseudo
177 //
178 // Indicates that the best row identifier is NOT a pseudo
179 // column. A possible value for the column PSEUDO_COLUMN in
180 // the TSQLResultSet object returned by the method
181 // GetBestRowIdentifier().
182 //
183 //___________________________________________________________________
184 // kBestRowPseudo
185 //
186 // Indicates that the best row identifier is a pseudo column.
187 // A possible value for the column PSEUDO_COLUMN in the
188 // TSQLResultSet object returned by the method
189 // GetBestRowIdentifier().
190 //
191 //___________________________________________________________________
192 // kVersionColumnUnknown
193 //
194 // Indicates that this version column may or may not be a pseudo
195 // column. A possible value for the column PSEUDO_COLUMN in
196 // the TSQLResultSet object returned by the method
197 // GetVersionColumns().
198 //
199 //___________________________________________________________________
200 // kVersionColumnNotPseudo
201 //
202 // Indicates that this version column is NOT a pseudo column.
203 // A possible value for the column PSEUDO_COLUMN in the
204 // TSQLResultSet object returned by the method GetVersionColumns().
205 //
206 //___________________________________________________________________
207 // kVersionColumnPseudo
208 //
209 // Indicates that this version column is a pseudo column.
210 // A possible value for the column PSEUDO_COLUMN in the
211 // TSQLResultSet object returned by the method GetVersionColumns().
212 //
213 //___________________________________________________________________
214 // kImportedKeyCascade
215 //
216 // A possible value for the columns UPDATE_RULE and
217 // DELETE_RULE in the TSQLResultSet objects returned by the
218 // methods GetImportedKeys(), GetExportedKeys(),
219 // and GetCrossReference().
220 //
221 // For the column UPDATE_RULE, it indicates that when the
222 // primary key is updated, the foreign key (imported key)
223 // is changed to agree with it.
224 //
225 // For the column DELETE_RULE, it indicates that when the
226 // primary key is deleted, rows that imported that key
227 // are deleted.
228 //
229 //___________________________________________________________________
230 // kImportedKeyRestrict
231 //
232 // A possible value for the columns UPDATE_RULE and DELETE_RULE
233 // in the TSQLResultSet objects returned by the methods
234 // GetImportedKeys(), GetExportedKeys(), and GetCrossReference().
235 //
236 // For the column UPDATE_RULE, it indicates that a primary
237 // key may not be updated if it has been imported by another
238 // table as a foreign key.
239 //
240 // For the column DELETE_RULE, it indicates that a primary
241 // key may not be deleted if it has been imported by another
242 // table as a foreign key.
243 //
244 //___________________________________________________________________
245 // kImportedKeySetNull
246 //
247 // A possible value for the columns UPDATE_RULE and DELETE_RULE
248 // in the TSQLResultSet objects returned by the methods
249 // GetImportedKeys(), GetExportedKeys(), and GetCrossReference().
250 //
251 // For the columns UPDATE_RULE and DELETE_RULE, it indicates
252 // that when the primary key is updated or deleted, the
253 // foreign key (imported key) is changed to NULL.
254 //
255 //___________________________________________________________________
256 // kImportedKeyNoAction
257 //
258 // A possible value for the columns UPDATE_RULE and DELETE_RULE
259 // in the TSQLResultSet objects returned by the methods
260 // GetImportedKeys(), GetExportedKeys(), and GetCrossReference().
261 //
262 // For the columns UPDATE_RULE and DELETE_RULE, it indicates
263 // that if the primary key has been imported, it cannot be
264 // updated or deleted.
265 //
266 //___________________________________________________________________
267 // kImportedKeySetDefault
268 //
269 // A possible value for the columns UPDATE_RULE and DELETE_RULE
270 // in the TSQLResultSet objects returned by the methods
271 // GetImportedKeys(), GetExportedKeys(), and GetCrossReference().
272 //
273 // For the columns UPDATE_RULE and DELETE_RULE, it indicates
274 // that if the primary key is updated or deleted,
275 // the foreign key (imported key) is set to the default value.
276 //
277 //___________________________________________________________________
278 // kImportedKeyInitiallyDeferred
279 //
280 // A possible value for the column DEFERRABILITY in
281 // the TSQLResultSet objects returned by the methods
282 // GetImportedKeys(), GetExportedKeys(), and GetCrossReference().
283 //
284 // Indicates deferrability. See SQL-92 for a definition.
285 //
286 //___________________________________________________________________
287 // kImportedKeyInitiallyImmediate
288 //
289 // A possible value for the column DEFERRABILITY in
290 // the TSQLResultSet objects returned by the methods
291 // GetImportedKeys(), GetExportedKeys(), and GetCrossReference().
292 //
293 // Indicates deferrability. See SQL-92 for a definition.
294 //
295 //___________________________________________________________________
296 // kImportedKeyNotDeferrable
297 //
298 // A possible value for the column DEFERRABILITY in
299 // the TSQLResultSet objects returned by the methods
300 // GetImportedKeys(), GetExportedKeys(), and GetCrossReference().
301 //
302 // Indicates deferrability. See SQL-92 for a definition.
303 //
304 //___________________________________________________________________
305 // kTypeNoNulls
306 //
307 // A possible value for column NULLABLE in the TSQLResultSet
308 // object returned by the method GetTypeInfo().
309 //
310 // Indicates that a NULL value is NOT allowed for
311 // this data type.
312 //
313 //___________________________________________________________________
314 // kTypeNullable
315 //
316 // A possible value for column NULLABLE in the TSQLResultSet
317 // object returned by the method GetTypeInfo().
318 //
319 // Indicates that a NULL value is allowed for this data type.
320 //
321 //___________________________________________________________________
322 // kTypeNullableUnknown
323 //
324 // A possible value for column NULLABLE in the TSQLResultSet
325 // object returned by the method GetTypeInfo().
326 //
327 // Indicates that it is not known whether a NULL value
328 // is allowed for this data type.
329 //
330 //___________________________________________________________________
331 // kTypePredNone
332 //
333 // A possible value for column SEARCHABLE in the TSQLResultSet
334 // object returned by the method GetTypeInfo().
335 //
336 // Indicates that WHERE search clauses are not supported
337 // for this type.
338 //
339 //___________________________________________________________________
340 // kTypePredChar
341 //
342 // A possible value for column SEARCHABLE in the TSQLResultSet
343 // object returned by the method GetTypeInfo().
344 //
345 // Indicates that the only WHERE search clause that can be
346 // based on this type is WHERE . . .LIKE.
347 //
348 //___________________________________________________________________
349 // kTypePredBasic
350 //
351 // A possible value for column SEARCHABLE in the TSQLResultSet
352 // object returned by the method GetTypeInfo().
353 //
354 // Indicates that one can base all WHERE search clauses
355 // except WHERE . . .LIKE on this data type.
356 //
357 //___________________________________________________________________
358 // kTypeSearchable
359 //
360 // A possible value for column SEARCHABLE in the TSQLResultSet
361 // object returned by the method GetTypeInfo().
362 //
363 // Indicates that all WHERE search clauses can be based
364 // on this type.
365 //
366 //___________________________________________________________________
367 // kTableIndexStatistic
368 //
369 // A possible value for column TYPE in the TSQLResultSet
370 // object returned by the method GetIndexInfo().
371 //
372 // Indicates that this column contains table statistics
373 // that are returned in conjunction with a table's index
374 // descriptions.
375 //
376 //___________________________________________________________________
377 // kTableIndexClustered
378 //
379 // A possible value for column TYPE in the TSQLResultSet object
380 // returned by the method GetIndexInfo().
381 //
382 // Indicates that this table index is a clustered index.
383 //
384 //___________________________________________________________________
385 // kTableIndexHashed
386 //
387 // A possible value for column TYPE in the TSQLResultSet object
388 // returned by the method GetIndexInfo().
389 //
390 // Indicates that this table index is a hashed index.
391 //
392 //___________________________________________________________________
393 // kTableIndexOther
394 //
395 // A possible value for column TYPE in the TSQLResultSet object
396 // returned by the method GetIndexInfo().
397 //
398 // Indicates that this table index is not a clustered index,
399 // a hashed index, or table statistics; it is something
400 // other than these.
401 //
402 // See also:
403 // TSQLTypes TSQLConnection
404 //
406 
408 #include <RDBC/TSQLResultSet.h>
409 #include <RDBC/TSQLConnection.h>
410 #include <RDBC/configure.h> //
411 
412 
413 #include "MySQLConnectionPrivate.h"
414 
416 
417 // allowed extra chars ( stolen from MyODBC-2.50.36/info.c )
418 UChar_t gAllowedChars[]= {
419  '\307','\374','\351','\342','\344','\340','\345','\347','\352','\353',
420  '\350','\357','\356','\354','\304','\305','\311','\346','\306','\364',
421  '\366','\362','\373','\371','\377','\326','\334','\341','\355','\363',
422  '\372','\361','\321',0};
423 
424 // from <http://mysql.com/doc///L/e/Legal_names.html> && mysql_com.h
425 const Int_t gNameLength = NAME_LEN; // Field/table name length
426 const Int_t gMaxDatabaseNameLength = HOSTNAME_LENGTH;
427 const Int_t gMaxTableNameLength = NAME_LEN;
428 const Int_t gMaxColumnNameLength = NAME_LEN;
429 const Int_t gMaxUserNameLength = USERNAME_LENGTH;
430 const Int_t gMaxAliasNameLength = 64;
431 const Int_t gMaxIndexLength = 256;
432 const Int_t gMaxLiteralLength = 0; // == 4294967295 (2^32 - 1) - NET_HEADER_SIZE - COMP_HEADER_SIZE
433 
434 MySQLResultSetPrivate* gResult = 0; // result set used in methods which return TSQLResultSets
435 
437 //___________________________________________________________________
439  void* imp):TSQL(imp)
440 {
441  // constructor
442 
443  fConnection = connection;
444  if(!gResult) gResult = = new MySQLResultSetPrivate();
445 }
446 
447 //___________________________________________________________________
449 {
450  // destructor will be called when fConnection is deleted
451 
452  fConnection = 0;
453  fImp = 0;
454 }
455 
456 //___________________________________________________________________
458 {
459  // Can all the procedures returned by GetProcedures be
460  // called by the current user?
461  //
462  // Returns:
463  // kTRUE if so; kFALSE otherwise
464  // Throws:
465  // TSQLException - if a database access error occurs
466 
467  return kFALSE;
468 }
469 
470 //___________________________________________________________________
472 {
473  // Can all the tables returned by GetTable() be SELECTed by
474  // the current user?
475  //
476  // Returns:
477  // kTRUE if so; kFALSE otherwise
478  // Throws:
479  // TSQLException - if a database access error occurs
480 
481  return kFALSE;
482 }
483 
484 //___________________________________________________________________
486 {
487  // What's our user name as known to the database?
488  //
489  // Returns:
490  // our database user name
491  // Throws:
492  // TSQLException - if a database access error occurs
493  //
494  // ... more comments based on "ODBC 3.5 Developer's Guide"
495  //
496  // Identifies the user name in a particular database
497  // (this name can be different from the login name)
498  //
499 
500  TString str;
501  TSQLStatement* stmt = fConnection->CreateSatement();
502  TSQLResultSet* rs = stmt->ExecuteQuery("select substring_index(USER(),\"@\",1)");
503  rs->Next();
504  str = rs->GetString(1);
505  delete stmt;
506  return str;
507 }
508 
509 //___________________________________________________________________
511 {
512  // Is the database in read-only mode?
513  //
514  // Returns:
515  // kTRUE if so; kFALSE otherwise
516  // Throws:
517  // TSQLException - if a database access error occurs
518  //
519  // ... more comments based on "ODBC 3.5 Developer's Guide"
520  //
521  // This characteristic pertains only to the data source itself;
522  // it is not a characteristic of the driver that enables access
523  // to the data source. A driver that is read/write can be used
524  // with a data source that is read-only.
525  //
526  // If a driver is read-only, all its data sources must be read-only
527  // and must return kTRUE for this method
528  //
529 
530  Bool_t return_value = kTRUE;
531  return return_value;
532 }
533 
534 //___________________________________________________________________
536 {
537  // Are NULL values sorted high?
538  //
539  // Returns:
540  // kTRUE if so; kFALSE otherwise
541  // Throws:
542  // TSQLException - if a database access error occurs
543  //
544  // Identifies where NULL values are sorted in a result data set
545  //
546 
547  return kFALSE;
548 }
549 
550 //___________________________________________________________________
552 {
553  // Are NULL values sorted low?
554  //
555  // Returns:
556  // kTRUE if so; kFALSE otherwise
557  // Throws:
558  // TSQLException - if a database access error occurs
559  //
560  // Identifies where NULL values are sorted in a result data set
561  //
562 
563  return !NullsAreSortedHigh();
564 }
565 
566 //___________________________________________________________________
568 {
569  // Are NULL values sorted at the start regardless of sort order?
570  //
571  // Returns:
572  // kTRUE if so; kFALSE otherwise
573  // Throws:
574  // TSQLException - if a database access error occurs
575  //
576  // Identifies where NULL values are sorted in a result data set
577  //
578 
579  return kFALSE;
580 }
581 
582 //___________________________________________________________________
584 {
585  // Are NULL values sorted at the end regardless of sort order?
586  //
587  // Returns:
588  // kTRUE if so; kFALSE otherwise
589  // Throws:
590  // TSQLException - if a database access error occurs
591  //
592  // Identifies where NULL values are sorted in a result data set
593  //
594 
595  return kFALSE;
596 }
597 
598 //___________________________________________________________________
600 {
601  // What's the name of this database product?
602  //
603  // Returns:
604  // database product name
605  // Throws:
606  // TSQLException - if a database access error occurs
607 
608  return "MySQL";
609 }
610 
611 //___________________________________________________________________
613 {
614  // What's the version of this database product?
615  //
616  // ... more comments based on "ODBC 3.5 Developer's Guide"
617  //
618  // This information returned in a string that has format
619  // mm.vv.rrrr, where mm is the major version number,
620  // vv is the minor version number, and rrrr is the release
621  // virsion number.
622  //
623  // Returns:
624  // database version
625  // Throws:
626  // TSQLException - if a database access error occurs
627 
629  return mysql_get_server_info(imp->fMYSQL);
630 }
631 
632 //___________________________________________________________________
634 {
635  // What's the name of this ODBC driver?
636  //
637  // Returns:
638  // driver name
639  // Throws:
640  // TSQLException - if a database access error occurs
641 
642  return "VO MySQL Driver";
643 }
644 
645 //___________________________________________________________________
647 {
648  // What's the version of this ODBC driver?
649  //
650  // ... more comments based on "ODBC 3.5 Developer's Guide"
651  //
652  // This information returned in a string that has format
653  // mm.vv.rrrr, where mm is the major version number,
654  // vv is the minor version number, and rrrr is the release
655  // virsion number
656  //
657  // Returns:
658  // driver version
659  // Throws:
660  // TSQLException - if a database access error occurs
661 
662  TString str = RDBC_VERSION;
663  return str;
664 }
665 
666 //___________________________________________________________________
668 {
669  // What's this driver's major version number?
670  //
671  // Returns:
672  // driver major version
673 
674  Int_t return_value = 0;
675  return return_value;
676 }
677 
678 //___________________________________________________________________
680 {
681  // What's this driver's minor version number?
682  //
683  // Returns:
684  // driver minor version number
685 
686  Int_t return_value = 0;
687  return return_value;
688 }
689 
690 //___________________________________________________________________
692 {
693  // Does the database store tables in a local file?
694  //
695  // Returns:
696  // kTRUE if so; kFALSE otherwise
697  // Throws:
698  // TSQLException - if a database access error occurs
699  //
700  // ... more comments based on "ODBC 3.5 Developer's Guide"
701  //
702  // kFALSE means that driver is a not single-tier driver
703  // thereore files are not supported
704 
705  return kFALSE;
706 }
707 
708 //___________________________________________________________________
710 {
711  // Does the database use a file for each table?
712  //
713  // Returns:
714  // kTRUE if the database uses a local file for each table
715  // Throws:
716  // TSQLException - if a database access error occurs
717  //
718  // ... more comments based on "ODBC 3.5 Developer's Guide"
719  //
720  // The single-tier driver treats files in a data source as
721  // tables
722  //
723 
724  return kFALSE;
725 }
726 
727 //___________________________________________________________________
729 {
730  // Does the database treat mixed case unquoted SQL identifiers
731  // as case sensitive and as a result store them in mixed case?
732  // A SQL-92 complient driver will always return kFALSE.
733  //
734  // Returns:
735  // kTRUE if so; kFALSE otherwise
736  // Throws:
737  // TSQLException - if a database access error occurs
738 
739  return kFALSE;
740 }
741 
742 //___________________________________________________________________
744 {
745  // Does the database treat mixed case unquoted SQL identifiers
746  // as case insensitive and store them in upper case?
747  //
748  // Returns:
749  // kTRUE if so; kFALSE otherwise
750  // Throws:
751  // TSQLException - if a database access error occurs
752 
753  return kFALSE;
754 }
755 
756 //___________________________________________________________________
758 {
759  // Does the database treat mixed case unquoted SQL identifiers
760  // as case insensitive and store them in lower case?
761  //
762  // Returns:
763  // kTRUE if so; kFALSE otherwise
764  // Throws:
765  // TSQLException - if a database access error occurs
766 
767  return kFALSE;
768 }
769 
770 //___________________________________________________________________
772 {
773  // Does the database treat mixed case unquoted SQL identifiers
774  // as case insensitive and store them in mixed case?
775  //
776  // Returns:
777  // kTRUE if so; kFALSE otherwise
778  // Throws:
779  // TSQLException - if a database access error occurs
780 
781  Bool_t return_value = kTRUE;
782  return return_value;
783 }
784 
785 //___________________________________________________________________
787 {
788  // Does the database treat mixed case quoted SQL identifiers
789  // as case sensitive and as a result store them in mixed case?
790  // A SQL-92 entry level-conformant driver will always
791  // return kTRUE.
792  //
793  // Returns:
794  // kTRUE if so; kFALSE otherwise
795  // Throws:
796  // TSQLException - if a database access error occurs
797 
798  Bool_t return_value = kTRUE;
799  return return_value;
800 }
801 
802 //___________________________________________________________________
804 {
805  // Does the database treat mixed case quoted SQL identifiers
806  // as case insensitive and store them in upper case?
807  //
808  // Returns:
809  // kTRUE if so; kFALSE otherwise
810  // Throws:
811  // TSQLException - if a database access error occurs
812 
813  return kFALSE;
814 }
815 
816 //___________________________________________________________________
818 {
819  // Does the database treat mixed case quoted SQL identifiers
820  // as case insensitive and store them in lower case?
821  //
822  // Returns:
823  // kTRUE if so; kFALSE otherwise
824  // Throws:
825  // TSQLException - if a database access error occurs
826 
827  return kFALSE;
828 }
829 
830 //___________________________________________________________________
832 {
833  // Does the database treat mixed case quoted SQL identifiers
834  // as case insensitive and store them in mixed case?
835  //
836  // Returns:
837  // kTRUE if so; kFALSE otherwise
838  // Throws:
839  // TSQLException - if a database access error occurs
840 
841  return kFALSE;
842 }
843 
844 //___________________________________________________________________
846 {
847  // What's the string used to quote SQL identifiers?
848  // This returns a space " " if identifier quoting isn't supported.
849  // A SQL-92 Full level-conformant driver always uses a double
850  // quote character (").
851  //
852  // Returns:
853  // the quoting string
854  // Throws:
855  // TSQLException - if a database access error occurs
856  //
857  // ... more comments based on "ODBC 3.5 Developer's Guide"
858  //
859  // Identifies the character tht is to be used as the starting and
860  // ending delimeter of a quoted(delimetered) identifier in SQL
861  // statements. (Identifiers passed in ODBC function parameters
862  // do not need to be quoted) This character can also be used for
863  // quoting catalog function parameters when ...
864  //
865  // If the data source does not support quoted identifiers,
866  // a blank string (" ") is returned
867  //
868 
869  return using323() ? "`" : " ";
870 }
871 
872 //___________________________________________________________________
874 {
875  // Gets a comma-separated list of all a database's SQL keywords
876  // that are NOT also SQL92 keywords.
877  //
878  // Throws:
879  // TSQLException - if a database access error occurs
880  //
881  // See also <http://mysql.com/doc///E/x/Extensions_to_ANSI.html>
882 
883  // stolen from MyODBC-2.50.36/info.c
884  TString str = "UNIQUE,ZEROFILL,UNSIGNED,BIGINT,BLOB,TINYBLOB,MEDIMUMBLOB,"
885  "LONGBLOB,MEDIUMINT,PROCEDURE,SHOW,LIMIT,DEFAULT,TABLES,"
886  "REGEXP,RLIKE,KEYS,TINYTEXT,MEDIUMTEXT";
887  return str;
888 }
889 
890 //___________________________________________________________________
892 {
893  // Gets a comma-separated list of math functions.
894  // These are the X/Open CLI math function names used in the ODBC
895  // function escape clause.
896  //
897  // Returns:
898  // the list
899  // Throws:
900  // TSQLException - if a database access error occurs
901 
902  TString str = "ABS,ACOS,ASIN,ATAN,ATAN2,BIT_COUNT,CEILING,COS,COT,"
903  "DEGREES,EXP,FLOOR,LOG,LOG10,MAX,MIN,MOD,PI,POW,POWER,"
904  "RADIANS,RAND,ROUND,SIN,SQRT,TAN,TRUNCATE";
905  return str;
906 }
907 
908 //___________________________________________________________________
910 {
911  // Gets a comma-separated list of string functions.
912  // These are the X/Open CLI string function names used in the
913  // ODBC function escape clause.
914  //
915  // Returns:
916  // the list
917  // Throws:
918  // TSQLException - if a database access error occurs
919 
920  TString str = "ASCII,CHAR,CHAR_LENGTH,CHARACTER_LENGTH,CONCAT,"
921  "ELT,FIELD,FIND_IN_SET,INSERT,INSTR,INTERVAL,"
922  "LCASE,LEFT,LENGTH,LOCATE,LOWER,LTRIM,MID,POSITION,"
923  "OCTET_LENGTH,REPEAT,REPLACE,REVERSE,RIGHT,RTRIM,"
924  "SPACE,SOUNDEX,SUBSTRING,SUBSTRING_INDEX,TRIM,"
925  "UCASE,UPPER";
926  return str;
927 }
928 
929 //___________________________________________________________________
931 {
932  // Gets a comma-separated list of system functions.
933  // These are the X/Open CLI system function names used in the
934  // ODBC function escape clause.
935  //
936  // Returns:
937  // the list
938  // Throws:
939  // TSQLException - if a database access error occurs
940 
941  TString str = "DATABASE,USER,SYSTEM_USER,SESSION_USER,"
942  "PASSWORD,ENCRYPT,LAST_INSERT_ID,VERSION";
943  return str;
944 }
945 
946 //___________________________________________________________________
948 {
949  // Gets a comma-separated list of time and date functions.
950  //
951  // Returns:
952  // the list
953  // Throws:
954  // TSQLException - if a database access error occurs
955 
956  TString str = "DAYOFWEEK,WEEKDAY,DAYOFMONTH,DAYOFYEAR,MONTH,"
957  "DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,"
958  "SECOND,PERIOD_ADD,PERIOD_DIFF,TO_DAYS,FROM_DAYS,"
959  "DATE_FORMAT,TIME_FORMAT,CURDATE,CURRENT_DATE,"
960  "CURTIME,CURRENT_TIME,NOW,SYSDATE,CURRENT_TIMESTAMP,"
961  "UNIX_TIMESTAMP,FROM_UNIXTIME,SEC_TO_TIME,TIME_TO_SEC";
962 
963  return str;
964 }
965 
966 //___________________________________________________________________
968 {
969  // Gets the string that can be used to escape wildcard characters.
970  // This is the string that can be used to escape '_' or '%' in
971  // the string pattern style catalog search parameters.
972  //
973  // The '_' character represents any single character.
974  //
975  // The '%' character represents any sequence of zero or more
976  // characters.
977  //
978  // Returns:
979  // the string used to escape wildcard characters
980  // Throws:
981  // TSQLException - if a database access error occurs
982  //
983  // ... more comments based on "ODBC 3.5 Developer's Guide"
984  //
985  // If driver does not provide a search-pattern escape character,
986  // there is no specified limit, or if limit is unknown, an
987  // empt string (" ") is returned.
988 
989  return "\\";
990 }
991 
992 //___________________________________________________________________
994 {
995  // Gets all the "extra" characters that can be used in unquoted
996  // identifier names ( those beyond a-z, A-Z, 0-9 and _ ),
997  // for example, a table, column or index name.
998  //
999  // Returns:
1000  // the string containing the extra characters
1001  // Throws:
1002  // TSQLException - if a database access error occurs
1003 
1004  return (char*)gAllowedChars; //
1005 }
1006 
1007 //___________________________________________________________________
1009 {
1010  // Is "ALTER TABLE" with add column supported?
1011  //
1012  // Returns:
1013  // kTRUE if so; kFALSE otherwise
1014  // Throws:
1015  // TSQLException - if a database access error occurs
1016 
1017  Bool_t return_value = kTRUE;
1018  return return_value;
1019 }
1020 
1021 //___________________________________________________________________
1023 {
1024  // Is "ALTER TABLE" with drop column supported?
1025  //
1026  // Returns:
1027  // kTRUE if so; kFALSE otherwise
1028  // Throws:
1029  // TSQLException - if a database access error occurs
1030 
1031  Bool_t return_value = kTRUE;
1032  return return_value;
1033 }
1034 
1035 //___________________________________________________________________
1037 {
1038  // Is column aliasing supported?
1039  //
1040  // If so, the SQL "AS" clause can be used to provide names
1041  // for computed columns or to provide alias names for columns
1042  // as required. A SQL-92 entry level-conformant driver always
1043  // returns kTRUE.
1044  //
1045  // Returns:
1046  // kTRUE if so; kFALSE otherwise
1047  // Throws:
1048  // TSQLException - if a database access error occurs
1049 
1050  Bool_t return_value = kTRUE;
1051  return return_value;
1052 }
1053 
1054 //___________________________________________________________________
1056 {
1057  // Are concatenations between NULL and non-NULL values NULL?
1058  // A SQL-92 entry level-conformant driver always returns kTRUE.
1059  //
1060  // Returns:
1061  // kTRUE if so; kFALSE otherwise
1062  // Throws:
1063  // TSQLException - if a database access error occurs
1064 
1065  Bool_t return_value = kTRUE;
1066  return return_value;
1067 }
1068 
1069 //___________________________________________________________________
1071 {
1072  // Is the CONVERT function between SQL types supported?
1073  //
1074  // Returns:
1075  // kTRUE if so; kFALSE otherwise
1076  // Throws:
1077  // TSQLException - if a database access error occurs
1078 
1079  return kFALSE;
1080 }
1081 
1082 //___________________________________________________________________
1084  Int_t toType )
1085 {
1086  // Is CONVERT between the given SQL types supported?
1087  //
1088  // Parameters:
1089  // fromType - the type to convert from
1090  // toType - the type to convert to
1091  //
1092  // Returns:
1093  // kTRUE if so; kFALSE otherwise
1094  // Throws:
1095  // TSQLException - if a database access error occurs
1096  // See Also:
1097  // TSQLTypes.h
1098  //
1099  //
1100  // ... more comments based on "ODBC 3.5 Developer's Guide"
1101  //
1102  // Identifiers whether the specified data type conversion
1103  // is supported by the data source and the CONVERT()
1104  // scalar function. For example, to find out if a data
1105  // source supports the conversion of a SQL_INTEGER data
1106  // type to an SQL_BIGINT data type, an application calls
1107  // SupportsConvert(kINTEGER,kBIGINT)
1108  // If the resulting value is kTRUE, the data type conversion
1109  // is supported.
1110 
1111  switch (fromType) {
1112 
1113  // The char/binary types can be converted to pretty much anything.
1114  case kCHAR:
1115  case kVARCHAR:
1116  case kLONGVARCHAR:
1117  case kBINARY:
1118  case kVARBINARY:
1119  case kLONGVARBINARY:
1120 
1121  switch (toType) {
1122  case kDECIMAL:
1123  case kNUMERIC:
1124  case kREAL:
1125  case kTINYINT:
1126  case kSMALLINT:
1127  case kINTEGER:
1128  case kBIGINT:
1129  case kFLOAT:
1130  case kDOUBLE:
1131  case kCHAR:
1132  case kVARCHAR:
1133  case kLONGVARCHAR:
1134  case kBINARY:
1135  case kVARBINARY:
1136  case kLONGVARBINARY:
1137  case kOTHER:
1138  case kDATE:
1139  case kTIME:
1140  case kTIMESTAMP:
1141  return kTRUE;
1142  default:
1143  return kFALSE;
1144  }
1145 
1146  // We don't handle the BIT type yet.
1147  case kBIT:
1148  return kFALSE;
1149 
1150  // The numeric types. Basically they can convert
1151  // among themselves, and with char/binary types.
1152 
1153  case kDECIMAL:
1154  case kNUMERIC:
1155  case kREAL:
1156  case kTINYINT:
1157  case kSMALLINT:
1158  case kINTEGER:
1159  case kBIGINT:
1160  case kFLOAT:
1161  case kDOUBLE:
1162 
1163  switch (toType) {
1164  case kDECIMAL:
1165  case kNUMERIC:
1166  case kREAL:
1167  case kTINYINT:
1168  case kSMALLINT:
1169  case kINTEGER:
1170  case kBIGINT:
1171  case kFLOAT:
1172  case kDOUBLE:
1173  case kCHAR:
1174  case kVARCHAR:
1175  case kLONGVARCHAR:
1176  case kBINARY:
1177  case kVARBINARY:
1178  case kLONGVARBINARY:
1179  return kTRUE;
1180  default:
1181  return kFALSE;
1182  }
1183 
1184  // MySQL doesn't support a NULL type.
1185  case kNULL:
1186  return kFALSE;
1187 
1188  case kOTHER:
1189 
1190  switch (toType) {
1191  case kCHAR:
1192  case kVARCHAR:
1193  case kLONGVARCHAR:
1194  case kBINARY:
1195  case kVARBINARY:
1196  case kLONGVARBINARY:
1197  return kTRUE;
1198  default:
1199  return kFALSE;
1200  }
1201 
1202  // Dates can be converted to char/binary types.
1203  case kDATE:
1204 
1205  switch (toType) {
1206  case kCHAR:
1207  case kVARCHAR:
1208  case kLONGVARCHAR:
1209  case kBINARY:
1210  case kVARBINARY:
1211  case kLONGVARBINARY:
1212  return kTRUE;
1213  default:
1214  return kFALSE;
1215  }
1216 
1217  // Time can be converted to char/binary types
1218  case kTIME:
1219  switch (toType) {
1220  case kCHAR:
1221  case kVARCHAR:
1222  case kLONGVARCHAR:
1223  case kBINARY:
1224  case kVARBINARY:
1225  case kLONGVARBINARY:
1226  return kTRUE;
1227  default:
1228  return kFALSE;
1229  }
1230 
1231  // Timestamp can be converted to char/binary types
1232  // and date/time types (with loss of precision).
1233  case kTIMESTAMP:
1234  switch (toType) {
1235  case kCHAR:
1236  case kVARCHAR:
1237  case kLONGVARCHAR:
1238  case kBINARY:
1239  case kVARBINARY:
1240  case kLONGVARBINARY:
1241  case kTIME:
1242  case kDATE:
1243  return kTRUE;
1244  default:
1245  return kFALSE;
1246  }
1247 
1248  // We shouldn't get here!
1249  default:
1250  return kFALSE; // not sure
1251  }
1252 }
1253 
1254 //___________________________________________________________________
1256 {
1257  // Are table correlation names supported?
1258  // A SQL-92 entry level-conformant driver always returns kTRUE.
1259  //
1260  // Returns:
1261  // kTRUE if so; kFALSE otherwise
1262  // Throws:
1263  // TSQLException - if a database access error occurs
1264 
1265  Bool_t return_value = kTRUE;
1266  return return_value;
1267 }
1268 
1269 //___________________________________________________________________
1271 {
1272  // If table correlation names are supported, are they restricted
1273  // to be different from the names of the tables?
1274  //
1275  // Returns:
1276  // kTRUE if so; kFALSE otherwise
1277  // Throws:
1278  // TSQLException - if a database access error occurs
1279 
1280  Bool_t return_value = kTRUE;
1281  return return_value;
1282 }
1283 
1284 //___________________________________________________________________
1286 {
1287  // Are expressions in "ORDER BY" lists supported?
1288  //
1289  // Returns:
1290  // kTRUE if so; kFALSE otherwise
1291  // Throws:
1292  // TSQLException - if a database access error occurs
1293 
1294  Bool_t return_value = kTRUE;
1295  return return_value;
1296 }
1297 
1298 //___________________________________________________________________
1300 {
1301  // Can an "ORDER BY" clause use columns not in the
1302  // SELECT statement?
1303  //
1304  // Returns:
1305  // kTRUE if so; kFALSE otherwise
1306  // Throws:
1307  // TSQLException - if a database access error occurs
1308 
1309  Bool_t return_value = kTRUE;
1310  return return_value;
1311 }
1312 
1313 //___________________________________________________________________
1315 {
1316  // Is some form of "GROUP BY" clause supported?
1317  //
1318  // Returns:
1319  // kTRUE if so; kFALSE otherwise
1320  // Throws:
1321  // TSQLException - if a database access error occurs
1322 
1323  Bool_t return_value = kTRUE
1324  return return_value;
1325 }
1326 
1327 //___________________________________________________________________
1329 {
1330  // Can a "GROUP BY" clause use columns not in the SELECT?
1331  //
1332  // For example,
1333  // SELECT DEPT,SALARY FROM EMPLOYEE GROUP BY DEPT,AGE
1334  //
1335  // Returns:
1336  // kTRUE if so; kFALSE otherwise
1337  // Throws:
1338  // TSQLException - if a database access error occurs
1339 
1340  Bool_t return_value = kTRUE;
1341  return return_value;
1342 }
1343 
1344 //___________________________________________________________________
1346 {
1347  // Can a "GROUP BY" clause add columns not in the SELECT provided
1348  // it specifies all the columns in the SELECT?
1349  //
1350  // For example,
1351  // SELECT DEPT,MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT,AGE
1352  //
1353  //
1354  // Returns:
1355  // kTRUE if so; kFALSE otherwise
1356  // Throws:
1357  // TSQLException - if a database access error occurs
1358 
1359  return kFALSE;
1360 }
1361 
1362 //___________________________________________________________________
1364 {
1365  // Is the escape character in "LIKE" clauses supported?
1366  // A SQL-92 entry level-conformant driver always returns kTRUE.
1367  //
1368  // Returns:
1369  // kTRUE if so; kFALSE otherwise
1370  // Throws:
1371  // TSQLException - if a database access error occurs
1372  //
1373 
1374  Bool_t return_value = kTRUE;
1375  return return_value;
1376 }
1377 
1378 //___________________________________________________________________
1380 {
1381  // Are multiple TSQLResultSets from a single execute supported?
1382  //
1383  // Returns:
1384  // kTRUE if so; kFALSE otherwise
1385  // Throws:
1386  // TSQLException - if a database access error occurs
1387 
1388  Bool_t return_value = kTRUE;
1389  return return_value;
1390 }
1391 
1392 //___________________________________________________________________
1394 {
1395  // Can we have multiple transactions open at once (on different
1396  // connections)?
1397  //
1398  // Returns:
1399  // kTRUE if so; kFALSE otherwise
1400  // Throws:
1401  // TSQLException - if a database access error occurs
1402 
1403  Bool_t return_value = kTRUE;
1404  return return_value;
1405 }
1406 
1407 //___________________________________________________________________
1409 {
1410  // Can columns be defined as non-nullable?
1411  // A SQL-92 entry level-conformant driver always returns kTRUE.
1412  //
1413  // Returns:
1414  // kTRUE if so; kFALSE otherwise
1415  // Throws:
1416  // TSQLException - if a database access error occurs
1417  //
1418  // ... more comments based on "ODBC 3.5 Developer's Guide"
1419  //
1420  // Indicates whether the data source supports the "NOT NULL"
1421  // column constraint in "CREATE TABLE" SQL statements
1422  //
1423 
1424  Bool_t return_value = kTRUE;
1425  return return_value;
1426 }
1427 
1428 //___________________________________________________________________
1430 {
1431  // Is the ODBC Minimum SQL grammar supported?
1432  // All SQL-92 entry level-conformant drivers must return kTRUE.
1433  //
1434  // Returns:
1435  // kTRUE if so; kFALSE otherwise
1436  // Throws:
1437  // TSQLException - if a database access error occurs
1438 
1439  Bool_t return_value = kTRUE;
1440  return return_value;
1441 }
1442 
1443 //___________________________________________________________________
1445 {
1446  // Is the ODBC Core SQL grammar supported?
1447  //
1448  // Returns:
1449  // kTRUE if so; kFALSE otherwise
1450  // Throws:
1451  // TSQLException - if a database access error occurs
1452 
1453  Bool_t return_value = kTRUE;
1454  return return_value;
1455 }
1456 
1457 //___________________________________________________________________
1459 {
1460  // Is the Extended SQL grammar supported?
1461  //
1462  // Returns:
1463  // kTRUE if so; kFALSE otherwise
1464  // Throws:
1465  // TSQLException - if a database access error occurs
1466 
1467  Bool_t return_value = kTRUE;
1468  return return_value;
1469 }
1470 
1471 //___________________________________________________________________
1473 {
1474  // Is the ANSI92 entry level SQL grammar supported?
1475  // All SQL-92 entry level-conformant drivers must return kTRUE.
1476  //
1477  // Returns:
1478  // kTRUE if so; kFALSE otherwise
1479  // Throws:
1480  // TSQLException - if a database access error occurs
1481 
1482  Bool_t return_value = kTRUE; // MyODBC says "Lie to make things work"
1483  return return_value;
1484 }
1485 
1486 //___________________________________________________________________
1488 {
1489  // Is the ANSI92 intermediate SQL grammar supported?
1490  //
1491  // Returns:
1492  // kTRUE if so; kFALSE otherwise
1493  // Throws:
1494  // TSQLException - if a database access error occurs
1495 
1496  Bool_t return_value = kTRUE; // MyODBC says "Lie to make things work"
1497  return return_value;
1498 }
1499 
1500 //___________________________________________________________________
1502 {
1503  // Is the ANSI92 full SQL grammar supported?
1504  //
1505  // Returns:
1506  // kTRUE if so; kFALSE otherwise
1507  // Throws:
1508  // TSQLException - if a database access error occurs
1509 
1510  Bool_t return_value = kTRUE; // MyODBC says "Lie to make things work"
1511  return return_value;
1512 }
1513 
1514 //___________________________________________________________________
1516 {
1517  // Is the SQL Integrity Enhancement Facility supported?
1518  //
1519  // Returns:
1520  // kTRUE if so; kFALSE otherwise
1521  // Throws:
1522  // TSQLException - if a database access error occurs
1523 
1524  return kFALSE;
1525 }
1526 
1527 //___________________________________________________________________
1529 {
1530  // Is some form of outer join supported?
1531  //
1532  // Returns:
1533  // kTRUE if so; kFALSE otherwise
1534  // Throws:
1535  // TSQLException - if a database access error occurs
1536 
1537  Bool_t return_value = kTRUE;
1538  return return_value;
1539 }
1540 
1541 //___________________________________________________________________
1543 {
1544  // Are full nested outer joins supported?
1545  //
1546  // Returns:
1547  // kTRUE if so; kFALSE otherwise
1548  // Throws:
1549  // TSQLException - if a database access error occurs
1550 
1551  return kFALSE;
1552 }
1553 
1554 //___________________________________________________________________
1556 {
1557  // Is there limited support for outer joins? (This will be kTRUE
1558  // if SupportFullOuterJoins is kTRUE.)
1559  //
1560  // Returns:
1561  // kTRUE if so; kFALSE otherwise
1562  // Throws:
1563  // TSQLException - if a database access error occurs
1564 
1565  Bool_t return_value = kTRUE;
1566  return return_value;
1567 }
1568 
1569 //___________________________________________________________________
1571 {
1572  // What's the database vendor's preferred term for "schema"?
1573  //
1574  // For example "owner",Authorization ID", or "Schema"
1575  // this string can be in upper, lower , or mixed case.
1576  //
1577  // An SQL-92 entry level-conformant driver returns "schema"
1578  //
1579  // Returns:
1580  // the vendor term
1581  // Throws:
1582  // TSQLException - if a database access error occurs
1583 
1584  return "owner";
1585 }
1586 
1587 //___________________________________________________________________
1589 {
1590  // What's the database vendor's preferred term for "table"
1591  //
1592  // An SQL-92 entry level-conformant driver returns "schema"
1593  //
1594  // Returns:
1595  // the vendor term
1596  // Throws:
1597  // TSQLException - if a database access error occurs
1598 
1599  return "table";
1600 }
1601 
1602 //___________________________________________________________________
1604 {
1605  // What's the database vendor's preferred term for a
1606  // stored procedure?
1607  //
1608  // For example,"database procedure","stored procedure",
1609  // "procedure","package", or "stored query"
1610  //
1611  // Returns:
1612  // the vendor term
1613  // Throws:
1614  // TSQLException - if a database access error occurs
1615 
1616  return "procedure";
1617 }
1618 
1619 //___________________________________________________________________
1621 {
1622  // What's the database vendor's preferred term for "catalog"?
1623  //
1624  // Can be for example "directory" or "database"
1625  // This string can be in upper, lower , or mixed case.
1626  // I catalogs are not supported by the data source, an empty
1627  // string ("") is returned.
1628  //
1629  // Returns:
1630  // the vendor term
1631  // Throws:
1632  // TSQLException - if a database access error occurs
1633 
1634  return "database";
1635 }
1636 
1637 //___________________________________________________________________
1639 {
1640  // Does a catalog appear at the start of a qualified table name?
1641  // (Otherwise it appears at the end)
1642  //
1643  // For example MySQL would say kTRUE,
1644  // dBASE driver also returns kTRUE because the directory (catalog)
1645  // name is at the start of the table name, a in \EMPDATA\EMP.DBF
1646  // An ORACLE Server driver returns kFALSE, because the catalog is
1647  // at the end of the table name as in ADMIN.EMP@EMPDATA
1648  //
1649  // Returns:
1650  // kTRUE if it appears at the start
1651  // Throws:
1652  // TSQLException - if a database access error occurs
1653 
1654  Bool_t return_value = kTRUE;
1655  return return_value;
1656 }
1657 
1658 //___________________________________________________________________
1660 {
1661  // What's the separator between catalog and table name?
1662  //
1663  // For example ORACLE would return a "@", while MySQL would say "."
1664  // If catalogs are not supported by the data source, an empty
1665  // string ("") is returned.
1666  //
1667  // An SQL-92 Full level conformant driver returns "."
1668  //
1669  // Returns:
1670  // the separator string
1671  // Throws:
1672  // TSQLException - if a database access error occurs
1673 
1674  return ".";
1675 }
1676 
1677 //___________________________________________________________________
1679 {
1680  // Can a schema name be used in a data manipulation statement?
1681  //
1682  // Returns:
1683  // kTRUE if so; kFALSE otherwise
1684  // Throws:
1685  // TSQLException - if a database access error occurs
1686  //
1687  // ... more comments based on "ODBC 3.5 Developer's Guide"
1688  //
1689  // Returns kTRUE if schemas are supported in all Data
1690  // Manipulation Language (DML) statements:
1691  // SELECT,INSERT,UPDATE,DELETE, and , if supported
1692  // SELECT FOR UPDATE and positioned UPDATE and DELETE
1693  // statements.
1694  //
1695  // An SQL-92 entry level-conformant driver returns kTRUE.
1696 
1697  Bool_t return_value = kFALSE;
1698  return return_value;
1699 }
1700 
1701 //___________________________________________________________________
1703 {
1704  // Can a schema name be used in a procedure call statement?
1705  //
1706  // Returns:
1707  // kTRUE if so; kFALSE otherwise
1708  // Throws:
1709  // TSQLException - if a database access error occurs
1710 
1711  return kFALSE;
1712 }
1713 
1714 //___________________________________________________________________
1716 {
1717  // Can a schema name be used in a table definition statement?
1718  //
1719  // Returns:
1720  // kTRUE if so; kFALSE otherwise
1721  // Throws:
1722  // TSQLException - if a database access error occurs
1723  //
1724  // Returns kTRUE if schemas are supported in all table
1725  // definition statements: CREATE TABLE,CREATE VIEW,
1726  // ALTER TABLE, DROP TABLE and DROP VIEW
1727  //
1728  // An SQL-92 entry level-conformant driver returns kTRUE.
1729 
1730  return kFALSE;
1731 }
1732 
1733 //___________________________________________________________________
1735 {
1736  // Can a schema name be used in an index definition statement?
1737  //
1738  // Returns:
1739  // kTRUE if so; kFALSE otherwise
1740  // Throws:
1741  // TSQLException - if a database access error occurs
1742  //
1743  // Returns kTRUE if schemas are supported in all index
1744  // definition statements: CREATE INDEX and DROP INDEX
1745 
1746  return kFALSE;
1747 }
1748 
1749 //___________________________________________________________________
1751 {
1752  // Can a schema name be used in a privilege definition statement?
1753  //
1754  // Returns:
1755  // kTRUE if so; kFALSE otherwise
1756  // Throws:
1757  // TSQLException - if a database access error occurs
1758  //
1759  // Returns kTRUE if schemas are supported in all privelege
1760  // definition statements: GRANT and REVOKE
1761  //
1762  // An SQL-92 entry level-conformant driver returns kTRUE.
1763 
1764  return kFALSE;
1765 }
1766 
1767 //___________________________________________________________________
1769 {
1770  // Can a catalog name be used in a data manipulation statement?
1771  //
1772  // Returns:
1773  // kTRUE if so; kFALSE otherwise
1774  // Throws:
1775  // TSQLException - if a database access error occurs
1776  //
1777  // ... more comments based on "ODBC 3.5 Developer's Guide"
1778  //
1779  // Returns kTRUE if catalog names can be used in all Data
1780  // Manipulation Language (DML) statements:
1781  // SELECT,INSERT,UPDATE,DELETE, and , if supported
1782  // SELECT FOR UPDATE and positioned UPDATE and DELETE
1783  // statements.
1784  //
1785  // An SQL-92 Full level-conformant driver returns kTRUE
1786 
1787  // Servers before 3.22 could not do this
1788  if (_Conn.getServerMajorVersion() >= 3) { // newer than version 3?
1789  if (_Conn.getServerMajorVersion() == 3) {
1790  if (_Conn.getServerMinorVersion() >= 22) { // minor 22?
1791  return true;
1792  }
1793  else {
1794  return false; // Old version 3
1795  }
1796  }
1797  else {
1798  return true; // newer than version 3.22
1799  }
1800  }
1801  else {
1802  return false; // older than version 3
1803  }
1804 
1805 }
1806 
1807 //___________________________________________________________________
1809 {
1810  // Can a catalog name be used in a procedure call statement?
1811  //
1812  // Returns:
1813  // kTRUE if so; kFALSE otherwise
1814  // Throws:
1815  // TSQLException - if a database access error occurs
1816  //
1817  // An SQL-92 Full level-conformant driver returns kTRUE
1818 
1819  return kFALSE;
1820 }
1821 
1822 //___________________________________________________________________
1824 {
1825  // Can a catalog name be used in a table definition statement?
1826  //
1827  // Returns:
1828  // kTRUE if so; kFALSE otherwise
1829  // Throws:
1830  // TSQLException - if a database access error occurs
1831  //
1832  // Returns kTRUE if catalog names can be used in all table
1833  // definition statements: CREATE TABLE,CREATE VIEW,
1834  // ALTER TABLE, DROP TABLE and DROP VIEW
1835 
1836  Bool_t return_value = kFALSE;
1837  return return_value;
1838 }
1839 
1840 //___________________________________________________________________
1842 {
1843  // Can a catalog name be used in an index definition statement?
1844  //
1845  // Returns:
1846  // kTRUE if so; kFALSE otherwise
1847  // Throws:
1848  // TSQLException - if a database access error occurs
1849  //
1850  // Returns kTRUE if catalog names can be used in all index
1851  // definition statements: CREATE INDEX and DROP INDEX
1852  //
1853  // An SQL-92 Full level-conformant driver returns kTRUE.
1854 
1855  return kFALSE;
1856 }
1857 
1858 //___________________________________________________________________
1860 {
1861  // Can a catalog name be used in a privilege definition statement?
1862  //
1863  // Returns:
1864  // kTRUE if so; kFALSE otherwise
1865  // Throws:
1866  // TSQLException - if a database access error occurs
1867  //
1868  // Returns kTRUE if catalog names can be used in all privelege
1869  // definition statements: GRANT and REVOKE
1870  //
1871  // An SQL-92 Full level-conformant driver returns kTRUE
1872 
1873  return kFALSE;
1874 }
1875 
1876 //___________________________________________________________________
1878 {
1879  // Is positioned DELETE supported?
1880  //
1881  // Returns:
1882  // kTRUE if so; kFALSE otherwise
1883  // Throws:
1884  // TSQLException - if a database access error occurs
1885 
1886  return kFALSE;
1887 }
1888 
1889 //___________________________________________________________________
1891 {
1892  // Is positioned UPDATE supported?
1893  //
1894  // Returns:
1895  // kTRUE if so; kFALSE otherwise
1896  // Throws:
1897  // TSQLException - if a database access error occurs
1898 
1899  return kFALSE;
1900 }
1901 
1902 //___________________________________________________________________
1904 {
1905  // Is SELECT for UPDATE supported?
1906  //
1907  // Returns:
1908  // kTRUE if so; kFALSE otherwise
1909  // Throws:
1910  // TSQLException - if a database access error occurs
1911 
1912  return kFALSE;
1913 }
1914 
1915 //___________________________________________________________________
1917 {
1918  // Are stored procedure calls using the stored procedure escape
1919  // syntax supported?
1920  //
1921  // Returns:
1922  // kTRUE if so; kFALSE otherwise
1923  // Throws:
1924  // TSQLException - if a database access error occurs
1925 
1926  return kFALSE;
1927 }
1928 
1929 //___________________________________________________________________
1931 {
1932  // Are subqueries in comparison expressions supported?
1933  // A SQL-92 entry level-conformant driver always returns kTRUE.
1934  //
1935  // Returns:
1936  // kTRUE if so; kFALSE otherwise
1937  // Throws:
1938  // TSQLException - if a database access error occurs
1939 
1940  Bool_t return_value = kTRUE;
1941  return return_value;
1942 }
1943 
1944 //___________________________________________________________________
1946 {
1947  // Are subqueries in EXISTS expressions supported?
1948  // A SQL-92 entry level-conformant driver always returns kTRUE.
1949  //
1950  // Returns:
1951  // kTRUE if so; kFALSE otherwise
1952  // Throws:
1953  // TSQLException - if a database access error occurs
1954 
1955  return kFALSE;
1956 }
1957 
1958 //___________________________________________________________________
1960 {
1961  // Are subqueries in IN statements supported?
1962  // A SQL-92 entry level-conformant driver always returns kTRUE.
1963  //
1964  // Returns:
1965  // kTRUE if so; kFALSE otherwise
1966  // Throws:
1967  // TSQLException - if a database access error occurs
1968 
1969  return kFALSE;
1970 }
1971 
1972 //___________________________________________________________________
1974 {
1975  // Are subqueries in quantified expressions supported?
1976  // A SQL-92 entry level-conformant driver always returns kTRUE.
1977  //
1978  // Returns:
1979  // kTRUE if so; kFALSE otherwise
1980  // Throws:
1981  // TSQLException - if a database access error occurs
1982 
1983  return kFALSE
1984 }
1985 
1986 //___________________________________________________________________
1988 {
1989  // Are correlated subqueries supported?
1990  // A SQL-92 entry level-conformant driver always returns kTRUE.
1991  //
1992  // Returns:
1993  // kTRUE if so; kFALSE otherwise
1994  // Throws:
1995  // TSQLException - if a database access error occurs
1996 
1997  return kFALSE
1998 }
1999 
2000 //___________________________________________________________________
2002 {
2003  // Is SQL UNION supported?
2004  // A SQL-92 entry level-conformant driver always returns kTRUE.
2005  //
2006  // Returns:
2007  // kTRUE if so; kFALSE otherwise
2008  // Throws:
2009  // TSQLException - if a database access error occurs
2010 
2011  return kFALSE;
2012 }
2013 
2014 //___________________________________________________________________
2016 {
2017  // Is SQL UNION ALL supported?
2018  // A SQL-92 entry level-conformant driver always returns kTRUE.
2019  //
2020  // Returns:
2021  // kTRUE if so; kFALSE otherwise
2022  // Throws:
2023  // TSQLException - if a database access error occurs
2024 
2025  return kFALSE;
2026 }
2027 
2028 //___________________________________________________________________
2029 Bool_t TSQLDatabaseMetaData::SupportsOpenCursorsAcrossCommit()
2030 {
2031  // Can cursors remain open across commits?
2032  //
2033  // Returns kTRUE if the data source and the driver can handle
2034  // open cursors (eg. TSQLResultSets) across a commit, or kFALSE
2035  // if they are invalidated.
2036  //
2037  // Returns:
2038  // kTRUE if cursors always remain open;
2039  // kFALSE if they might not remain open
2040  // Throws:
2041  // TSQLException - if a database access error occurs
2042  //
2043  // ... more comments based on "ODBC 3.5 Developer's Guide"
2044  //
2045  // Returns kTRUE if cursors and access plans for prepared SQL
2046  // statements reamin as they were before the COMMIT operation
2047  // ( see TSQLConnection::Commit() method ) was performed.
2048  // The application can continue to fetch data or it can close
2049  // cursor and re-execute SQL statement without having to
2050  // re-prepare it.
2051  //
2052 
2053  return kFALSE;
2054 }
2055 
2056 //___________________________________________________________________
2058 {
2059  // Can cursors remain open across rollbacks?
2060  //
2061  // Returns kTRUE if the data source and the driver can handle
2062  // open cursors (eg. TSQLResultSet s) across a rollback, or kFALSE
2063  // if they are invalidated.
2064  //
2065  // Returns:
2066  // kTRUE if cursors always remain open;
2067  // kFALSE if they might not remain open
2068  // Throws:
2069  // TSQLException - if a database access error occurs
2070  //
2071  // ... more comments based on "ODBC 3.5 Developer's Guide"
2072  //
2073  // Returns kTRUE if cursors and access plans for prepared SQL
2074  // statements reamin as they were before the ROLLBACK operation
2075  // ( see TSQLConnection::Rollback() method ) was performed.
2076  // The application can continue to fetch data or it can close
2077  // cursor and re-execute SQL statement without having to
2078  // re-prepare it.
2079  //
2080 
2081  return kFALSE;
2082 }
2083 
2084 //___________________________________________________________________
2086 {
2087  // Can statements remain open across commits?
2088  //
2089  // Returns kTRUE if the data source and the driver can handle
2090  // open statements across a commit, or kFALSE if
2091  // they are invalidated.
2092  //
2093  // Returns:
2094  // kTRUE if statements always remain open;
2095  // kFALSE if they might not remain open
2096  // Throws:
2097  // TSQLException - if a database access error occurs
2098 
2099  return kFALSE;
2100 }
2101 
2102 //___________________________________________________________________
2104 {
2105  // Can statements remain open across rollbacks?
2106  //
2107  // Returns kTRUE if the data source and the driver can handle
2108  // open statements across a rollback, or kFALSE if
2109  // they are invalidated.
2110  //
2111  // Returns:
2112  // kTRUE if statements always remain open;
2113  // kFALSE if they might not remain open
2114  // Throws:
2115  // TSQLException - if a database access error occurs
2116 
2117  return kFALSE;
2118 }
2119 
2120 //___________________________________________________________________
2122 {
2123  // How many hex characters can you have in an inline binary
2124  // literal (number of hexadecimal characters, exluding the
2125  // literal prefix and suffix ) ? For example the binary
2126  // literal 0xFFAA has a length of 4.
2127  //
2128  // Returns:
2129  // max binary literal length in hex characters; a result
2130  // of zero means that thereis no limit or the limit is
2131  // not known
2132  // Throws:
2133  // TSQLException - if a database access error occurs
2134 
2135  return gMaxLiteralLength;
2136 }
2137 
2138 //___________________________________________________________________
2140 {
2141  // What's the max length for a character literal
2142  // (number of characters, exluding the literal prefix
2143  // and suffix ) ?
2144  //
2145  // Returns:
2146  // max literal length; a result of zero means that
2147  // there is no limit or the limit is not known
2148  // Throws:
2149  // TSQLException - if a database access error occurs
2150 
2151  return gMaxLiteralLength;
2152 }
2153 
2154 //___________________________________________________________________
2156 {
2157  // What's the limit on column name length?
2158  //
2159  // Returns:
2160  // max column name length; a result of zero means that
2161  // there is no limit or the limit is not known
2162  // Throws:
2163  // TSQLException - if a database access error occurs
2164  //
2165  // See also <http://mysql.com/doc///L/e/Legal_names.html>
2166 
2167  return gMaxColumnNameLength;
2168 }
2169 
2170 //___________________________________________________________________
2172 {
2173  // What's the maximum number of columns in a "GROUP BY" clause?
2174  //
2175  // Returns:
2176  // max number of columns; a result of zero means that
2177  // there is no limit or the limit is not known
2178  // Throws:
2179  // TSQLException - if a database access error occurs
2180 
2181  return 16;
2182 }
2183 
2184 //___________________________________________________________________
2186 {
2187  // What's the maximum number of columns allowed in an index?
2188  //
2189  // Returns:
2190  // max number of columns; a result of zero means that
2191  // there is no limit or the limit is not known
2192  // Throws:
2193  // TSQLException - if a database access error occurs
2194  //
2195  // See also <http://mysql.com/doc///M/u/Multiple-column_indexes.html>
2196 
2197  return 16;
2198 }
2199 
2200 //___________________________________________________________________
2202 {
2203  // What's the maximum number of columns in an "ORDER BY" clause?
2204  //
2205  // Returns:
2206  // max number of columns; a result of zero means that
2207  // there is no limit or the limit is not known
2208  // Throws:
2209  // TSQLException - if a database access error occurs
2210 
2211  return 16;
2212 }
2213 
2214 //___________________________________________________________________
2216 {
2217  // What's the maximum number of columns in a "SELECT" list?
2218  //
2219  // Returns:
2220  // max number of columns; a result of zero means that
2221  // there is no limit or the limit is not known
2222  // Throws:
2223  // TSQLException - if a database access error occurs
2224 
2225  return 256;
2226 }
2227 
2228 //___________________________________________________________________
2230 {
2231  // What's the maximum number of columns in a table?
2232  //
2233  // Returns:
2234  // max number of columns; a result of zero means that
2235  // there is no limit or the limit is not known
2236  // Throws:
2237  // TSQLException - if a database access error occurs
2238 
2239  return 32;
2240 }
2241 
2242 //___________________________________________________________________
2244 {
2245  // How many active connections can we have at a time to this
2246  // database? This value can reflect a limitation imposed by
2247  // either the driver or the data source.
2248  //
2249  // Returns:
2250  // max number of active connections; a result of zero
2251  // means that there is no limit or the limit is not known
2252  // Throws:
2253  // TSQLException - if a database access error occurs
2254 
2255  return 0;
2256 }
2257 
2258 //___________________________________________________________________
2260 {
2261  // What's the maximum cursor name length?
2262  //
2263  // Returns:
2264  // max cursor name length in bytes; a result of zero means
2265  // that there is no limit or the limit is not known
2266  // Throws:
2267  // TSQLException - if a database access error occurs
2268 
2269  return gMaxCursorNameLength;
2270 }
2271 
2272 //___________________________________________________________________
2274 {
2275  // What's the maximum length of an index (in bytes)?
2276  //
2277  // Returns:
2278  // max index length in bytes; a result of zero means that
2279  // there is no limit or the limit is not known
2280  // Throws:
2281  // TSQLException - if a database access error occurs
2282  //
2283  // See also, <http://mysql.com/doc///I/n/Indexes.html>
2284 
2285  return gMaxIndexLength;
2286 }
2287 
2288 //___________________________________________________________________
2290 {
2291  // What's the maximum length allowed for a schema name?
2292  //
2293  // Returns:
2294  // max name length in bytes; a result of zero means that
2295  // there is no limit or the limit is not known
2296  // Throws:
2297  // TSQLException - if a database access error occurs
2298 
2299  return 0;
2300 }
2301 
2302 //___________________________________________________________________
2304 {
2305  // What's the maximum length of a procedure name?
2306  //
2307  // Returns:
2308  // max name length in bytes; a result of zero means that
2309  // there is no limit or the limit is not known
2310  // Throws:
2311  // TSQLException - if a database access error occurs
2312 
2313  return 0;
2314 }
2315 
2316 //___________________________________________________________________
2318 {
2319  // What's the maximum length of a catalog name?
2320  //
2321  // Returns:
2322  // max name length in bytes; a result of zero means
2323  // that there is no limit or the limit is not known
2324  // Throws:
2325  // TSQLException - if a database access error occurs
2326  //
2327  // See also, <http://mysql.com/doc///L/e/Legal_names.html>
2328 
2329  return gMaxDatabaseNameLength;
2330 }
2331 
2332 //___________________________________________________________________
2334 {
2335  // What's the maximum length of a single row?
2336  //
2337  // Returns:
2338  // max row size in bytes; a result of zero means
2339  // that there is no limit or the limit is not known
2340  // Throws:
2341  // TSQLException - if a database access error occurs
2342 
2343  return 0;
2344 }
2345 
2346 //___________________________________________________________________
2348 {
2349  // Did GetMaxRowSize() include LONGVARCHAR and LONGVARBINARY blobs?
2350  //
2351  // Returns:
2352  // kTRUE if so; kFALSE otherwise
2353  // Throws:
2354  // TSQLException - if a database access error occurs
2355  //
2356 
2357  return kTRUE;
2358 }
2359 
2360 //___________________________________________________________________
2362 {
2363  // What's the maximum length of a SQL statement?
2364  //
2365  // Returns:
2366  // max length in bytes; a result of zero means that there
2367  // is no limit or the limit is not known
2368  // Throws:
2369  // TSQLException - if a database access error occurs
2370 
2371  return MySQLdefs::kMAXBUF - 4; // Max buffer - header
2372 }
2373 
2374 //___________________________________________________________________
2376 {
2377  // How many active statements can we have open at one time to this
2378  // database?
2379  //
2380  // Returns:
2381  // the maximum number of statements that can be open at
2382  // one time; a result of zero means that there is no limit
2383  // or the limit is not known
2384  // Throws:
2385  // TSQLException - if a database access error occurs
2386  //
2387  // ... more comments based on "ODBC 3.5 Developer's Guide"
2388  //
2389  // Identifies the maximum number of active SQL statements
2390  // the driver can support for a connection. A statement is defined
2391  // as active if it has results pending, with the term results
2392  // meaning ows from a SELECT operation or rows affected by an
2393  // INSERT, UPDATE, or DELETE operation (such as a row count),
2394  // or if it is in a "Need Data" state. This value can reflect a
2395  // limitation imposed by either the driver or the data source
2396  //
2397 
2398  return 0;
2399 }
2400 
2401 //___________________________________________________________________
2403 {
2404  // What's the maximum length of a table name?
2405  //
2406  // Returns:
2407  // max name length in bytes; a result of zero means that
2408  // there is no limit or the limit is not known
2409  // Throws:
2410  // TSQLException - if a database access error occurs
2411  //
2412  // See also, <http://mysql.com/doc///L/e/Legal_names.html>
2413 
2414  return gMaxTableNameLength;
2415 }
2416 
2417 //___________________________________________________________________
2419 {
2420  // What's the maximum number of tables in a SELECT statement?
2421  //
2422  // Returns:
2423  // the maximum number of tables allowed in a SELECT
2424  // statement; a result of zero means that there is no
2425  // limit or the limit is not known
2426  // Throws:
2427  // TSQLException - if a database access error occurs
2428  //
2429  // ... more comments based on "ODBC 3.5 Developer's Guide"
2430  //
2431  // Identifies the maximum number of tables allowed in the
2432  // FROM clause of a SELECT statement.
2433  //
2434 
2435  return 32; // ?? odbc driver returns 32
2436 }
2437 
2438 //___________________________________________________________________
2440 {
2441  // What's the maximum length of a user name?
2442  //
2443  // Returns:
2444  // max user name length in bytes; a result of zero means
2445  // that there is no limit or the limit is not known
2446  // Throws:
2447  // TSQLException - if a database access error occurs
2448 
2449  return gNameLength;
2450 }
2451 
2452 //___________________________________________________________________
2454 {
2455  // What's the database's default transaction isolation level?
2456  // The values are defined in TSQLConnection.
2457  //
2458  // Returns:
2459  // the default isolation level
2460  // Throws:
2461  // TSQLException - if a database access error occurs
2462  // See Also:
2463  // TSQLConnection
2464 
2465  return kTRANSACTION_NONE;
2466 }
2467 
2468 //___________________________________________________________________
2470 {
2471  // Are transactions supported? If not, invoking the method commit
2472  // is a noop and the isolation level is TRANSACTION_NONE.
2473  //
2474  // Returns:
2475  // kTRUE if transactions are supported; kFALSE otherwise
2476  // Throws:
2477  // TSQLException - if a database access error occurs
2478 
2479  return kFALSE;
2480 }
2481 
2482 //___________________________________________________________________
2484  Int_t level )
2485 {
2486  // Does this database support the given transaction isolation
2487  // level?
2488  //
2489  // Parameters:
2490  // level - the values are defined in TSQLConnection
2491  //
2492  // Returns:
2493  // kTRUE if so; kFALSE otherwise
2494  // Throws:
2495  // TSQLException - if a database access error occurs
2496  // See Also:
2497  // TSQLConnection
2498 
2499  return kFALSE;
2500 }
2501 
2502 //___________________________________________________________________
2504 {
2505  // Are both data definition and data manipulation statements
2506  // within a transaction supported?
2507  //
2508  // Returns:
2509  // kTRUE if so; kFALSE otherwise
2510  // Throws:
2511  // TSQLException - if a database access error occurs
2512 
2513  return kFALSE;
2514 }
2515 
2516 //___________________________________________________________________
2518 {
2519  // Are only data manipulation statements within a transaction
2520  // supported?
2521  //
2522  // Returns:
2523  // kTRUE if so; kFALSE otherwise
2524  // Throws:
2525  // TSQLException - if a database access error occurs
2526 
2527  return kFALSE;
2528 }
2529 
2530 //___________________________________________________________________
2532 {
2533  // Does a data definition statement within a transaction force
2534  // the transaction to commit?
2535  //
2536  // Returns:
2537  // kTRUE if so; kFALSE otherwise
2538  // Throws:
2539  // TSQLException - if a database access error occurs
2540 
2541  return kFALSE;
2542 }
2543 
2544 //___________________________________________________________________
2546 {
2547  // Is a data definition statement within a transaction ignored?
2548  //
2549  // Returns:
2550  // kTRUE if so; kFALSE otherwise
2551  // Throws:
2552  // TSQLException - if a database access error occurs
2553 
2554  return kFALSE;
2555 }
2556 
2557 //___________________________________________________________________
2559  const TString& catalog,
2560  const TString& schemaPattern,
2561  const TString& procedureNamePattern )
2562 {
2563  // Gets a description of the stored procedures available in
2564  // a catalog.
2565  //
2566  // Only procedure descriptions matching the schema and procedure
2567  // name criteria are returned. They are ordered by PROCEDURE_SCHEM,
2568  // and PROCEDURE_NAME.
2569  //
2570  // Each procedure description has the the following columns:
2571  //
2572  // 1.PROCEDURE_CAT string => procedure catalog (may be null)
2573  //
2574  // 2.PROCEDURE_SCHEM string => procedure schema (may be null)
2575  //
2576  // 3.PROCEDURE_NAME string => procedure name
2577  //
2578  // 4.reserved for future use
2579  // 5.reserved for future use
2580  // 6.reserved for future use
2581  //
2582  // 7.REMARKS string => explanatory comment on the procedure
2583  //
2584  // 8.PROCEDURE_TYPE short => kind of procedure:
2585  //
2586  // kProcedureResultUnknown - May return a result
2587  // kProcedureNoResult - Does not return a result
2588  // kProcedureReturnsResult - Returns a result
2589  //
2590  // Parameters:
2591  // catalog - a catalog name;
2592  // "" - retrieves those without a catalog;
2593  // schemaPattern - a schema name pattern;
2594  // "" - retrieves those without a schema
2595  // procedureNamePattern - a procedure name pattern
2596  //
2597  // Returns:
2598  // TSQLResultSet - each row is a procedure description
2599  // Throws:
2600  // TSQLException - if a database access error occurs
2601  // See Also:
2602  // GetSearchStringEscape()
2603 
2604  Throw( new TSQLException("MyODBC doesn't support this yet","08002",4000) );
2605  return 0;
2606 }
2607 
2608 //___________________________________________________________________
2610  const TString& catalog,
2611  const TString& schemaPattern,
2612  const TString& procedureNamePattern,
2613  const TString& columnNamePattern )
2614 {
2615  // Gets a description of a catalog's stored procedure parameters
2616  // and result columns.
2617  //
2618  // Only descriptions matching the schema, procedure and
2619  // parameter name criteria are returned. They are ordered by
2620  // PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return
2621  // value, if any, is first. Next are the parameter descriptions
2622  // in call order. The column descriptions follow in column number
2623  // order.
2624  //
2625  // Each row in the TSQLResultSet is a parameter description or
2626  // column description with the following fields:
2627  //
2628  // 1.PROCEDURE_CAT string => procedure catalog (may be null)
2629  //
2630  // 2.PROCEDURE_SCHEM string => procedure schema (may be null)
2631  //
2632  // 3.PROCEDURE_NAME string => procedure name
2633  //
2634  // 4.COLUMN_NAME string => column/parameter name
2635  //
2636  // 5.COLUMN_TYPE Short => kind of column/parameter:
2637  //
2638  // kProcedureColumnUnknown - nobody knows
2639  // kProcedureColumnIn - IN parameter
2640  // kProcedureColumnInOut - INOUT parameter
2641  // kProcedureColumnOut - OUT parameter
2642  // kProcedureColumnReturn - procedure return value
2643  // kProcedureColumnResult - result column in TSQLResultSet
2644  //
2645  // 6.DATA_TYPE short => SQL type from TSQLTypes
2646  //
2647  // 7.TYPE_NAME string => SQL type name, for a UDT type
2648  // the type name is fully qualified
2649  //
2650  // 8.PRECISION int => precision
2651  //
2652  // 9.LENGTH int => length in bytes of data
2653  //
2654  // 10.SCALE short => scale
2655  //
2656  // 11.RADIX short => radix
2657  //
2658  // 12.NULLABLE short => can it contain NULL?
2659  //
2660  // kProcedureNoNulls - does not allow NULL values
2661  // kProcedureNullable - allows NULL values
2662  // kProcedureNullableUnknown - nullability unknown
2663  //
2664  // 13.REMARKS string => comment describing parameter/column
2665  //
2666  // Note: Some databases may not return the column descriptions
2667  // for a procedure. Additional columns beyond REMARKS
2668  // can be defined by the database.
2669  //
2670  // Parameters:
2671  // catalog - a catalog name;
2672  // "" - retrieves those without a catalog;
2673  // schemaPattern - a schema name pattern;
2674  // "" - retrieves those without a schema
2675  // procedureNamePattern - a procedure name pattern
2676  // columnNamePattern - a column name pattern
2677  //
2678  // Returns:
2679  // TSQLResultSet - each row describes a stored procedure
2680  // parameter or column
2681  // Throws:
2682  // TSQLException - if a database access error occurs
2683  // See Also:
2684  // GetSearchStringEscape()
2685 
2686  Throw( new TSQLException("MyODBC doesn't support this yet","08002",4000) );
2687  return 0;
2688 }
2689 
2690 //___________________________________________________________________
2692  const TString& catalog,
2693  const TString& schemaPattern,
2694  const TString& tableNamePattern,
2695  const TString& types )
2696 {
2697  // Gets a description of tables available in a catalog.
2698  //
2699  // Only table descriptions matching the catalog, schema,
2700  // table name and type criteria are returned. They are ordered
2701  // by TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
2702  //
2703  // Each table description has the following columns:
2704  //
2705  // 1.TABLE_CAT string => table catalog (may be null)
2706  //
2707  // 2.TABLE_SCHEM string => table schema (may be null)
2708  //
2709  // 3.TABLE_NAME string => table name
2710  //
2711  // 4.TABLE_TYPE string => table type. Typical types are:
2712  //
2713  // "TABLE", "VIEW", "SYSTEM TABLE",
2714  // "GLOBAL TEMPORARY", "LOCAL TEMPORARY",
2715  // "ALIAS", "SYNONYM".
2716  //
2717  // 5.REMARKS string => explanatory comment on the table
2718  //
2719  // Note: Some databases may not return information for all tables.
2720  //
2721  // Parameters:
2722  // catalog - a catalog name;
2723  // "" - retrieves those without a catalog;
2724  // schemaPattern - a schema name pattern;
2725  // "" - retrieves those without a schema
2726  // tableNamePattern - a table name pattern
2727  // types - a list of table types to include;
2728  // null returns all types
2729  //
2730  // Returns:
2731  // TSQLResultSet - each row is a table description
2732  // Throws:
2733  // TSQLException - if a database access error occurs
2734  // See Also:
2735  // GetSearchStringEscape()
2736 
2737  static MYSQL_FIELD SQLTABLES_fields[] = {
2738  {"TABLE_CAT","Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
2739  {"TABLE_SHEM","Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
2740  {"TABLE_NAME","Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,NAME_LEN,0},
2741  {"TABLE_TYPE","Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,5,0},
2742  {"REMARKS","Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,11}};
2743 
2744  const Int_t SQLTABLES_FIELDS = array_elements(SQLTABLES_values);
2745 
2746  gResult->Close();
2748  TString db = con->fURL->GetDatabase();
2749 
2750  if( !catalog.IsNull() && schemaPattern.IsNull() && tableNamePattern.IsNull() ) {
2751  gResult->fMYSQL_RES = mysql_list_dbs(con->fMYSQL,catalog);
2752 
2753  if(!gResult->fMYSQL_RES) {
2754  Throw( new TSQLException("Could not read database names","S1000",0) );
2755  return 0;
2756  }
2757 
2758  gResult->fMYSQL_RES->fields = SQLTABLES_fields;
2759  gResult->fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2760  gResult->fMYSQL_RES->current_field = 0;
2761 
2762  return new TSQLResultSet(0,gResult);
2763  }
2764 
2765  if( catalog.IsNull() && schemaPattern == "%" && tableNamePattern.IsNull() ) {
2766  gResult->fMYSQL_RES = (MYSQL_RES*) my_malloc(sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2767  gResult->fMYSQL_RES->row_count = 1;
2768  gResult->fMYSQL_RES->fields = SQLTABLES_fields;
2769  gResult->fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2770  gResult->fMYSQL_RES->current_field = 0;
2771 
2772  return new TSQLResultSet(0,gResult);
2773  }
2774 
2775  if( catalog.IsNull() && schemaPattern.IsNull() &&
2776  tableNamePattern.IsNull() && types=="%" ) {
2777  gResult->fMYSQL_RES = (MYSQL_RES*) my_malloc(sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2778  gResult->fMYSQL_RES->row_count = 1;
2779  gResult->fMYSQL_RES->fields = SQLTABLES_fields;
2780  gResult->fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2781  gResult->fMYSQL_RES->current_field = 0;
2782 
2783  return new TSQLResultSet(0,gResult);
2784  }
2785 
2786  // Return empty set if unknown tbale type or if catalog or schemaPattern is used
2787 
2788  if( (!types.IsNull() && !types.Contains("TABLE") ) ||
2789  (!catalog.IsNull() && catalog != "%" && catalog != db) ||
2790  (!schemaPattern.IsNull() && schemaPattern != "%" && catalog != db) ) {
2791  gResult->fMYSQL_RES = (MYSQL_RES*) my_malloc(sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2792  gResult->fMYSQL_RES->row_count = 0;
2793  gResult->fMYSQL_RES->fields = SQLTABLES_fields;
2794  gResult->fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2795  gResult->fMYSQL_RES->current_field = 0;
2796 
2797  return new TSQLResultSet(0,gResult);
2798  }
2799 
2800  // this was a normal request for tables. Return matching tables
2801 
2802  gResult->fMYSQL_RES = mysql_list_tables(con->fMYSQL,tableNamePattern);
2803 
2804  if(!gResult->fMYSQL_RES) {
2805  Throw( new TSQLException("Could not read table names","S1000",0) );
2806  return 0;
2807  }
2808 
2809  gResult->fMYSQL_RES->fields = SQLTABLES_fields;
2810  gResult->fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2811  gResult->fMYSQL_RES->current_field = 0;
2812 
2813  return new TSQLResultSet(0,gResult);
2814 }
2815 
2816 //___________________________________________________________________
2818 {
2819  // Gets the schema names available in this database. The results
2820  // are ordered by schema name.
2821  //
2822  // The schema column is:
2823  // 1.TABLE_SCHEM string => schema name
2824  //
2825  // Returns:
2826  // TSQLResultSet - each row has a single string column
2827  // that is a schema name
2828  // Throws:
2829  // TSQLException - if a database access error occurs
2830  //
2831  // Note: result the same as GetTables("%","","","");
2832 
2833  static MYSQL_FIELD SCHEMA_fields[] = {
2834  {"TABLE_SHEM","Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0}};
2835 
2836  gResult->Close();
2838 
2839  gResult->fMYSQL_RES = (MYSQL_RES*) my_malloc(sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2840  gResult->fMYSQL_RES->row_count = 1;
2841  gResult->fMYSQL_RES->fields = SCHEMA_fields;
2842  gResult->fMYSQL_RES->field_count = 1;
2843  gResult->fMYSQL_RES->current_field = 0;
2844 
2845  return new TSQLResultSet(0,gResult);
2846 }
2847 
2848 //___________________________________________________________________
2850 {
2851  // Gets the catalog names available in this database. The results
2852  // are ordered by catalog name.
2853  //
2854  // The catalog column is:
2855  // 1.TABLE_CAT string => catalog name
2856  //
2857  // Returns:
2858  // TSQLResultSet - each row has a single string column
2859  // that is a catalog name
2860  // Throws:
2861  // TSQLException - if a database access error occurs
2862 
2863  static MYSQL_FIELD CATALOG_fields[] = {
2864  {"TABLE_CAT","Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0}};
2865 
2866  gResult->Close();
2868 
2869  gResult->fMYSQL_RES = mysql_list_dbs(con->fMYSQL,"%");
2870 
2871  if(!gResult->fMYSQL_RES) {
2872  Throw( new TSQLException("Could not read database names","S1000",0) );
2873  return 0;
2874  }
2875 
2876  gResult->fMYSQL_RES->fields = CATALOG_fields;
2877  gResult->fMYSQL_RES->field_count = 1;
2878  gResult->fMYSQL_RES->current_field = 0;
2879 
2880  return new TSQLResultSet(0,gResult);
2881 }
2882 
2883 //___________________________________________________________________
2885 {
2886  // Gets the table types available in this database. The results
2887  // are ordered by table type.
2888  //
2889  // The table type is:
2890  // 1.TABLE_TYPE string => table type. Typical types are:
2891  //
2892  // "TABLE", "VIEW", "SYSTEM TABLE",
2893  // "GLOBAL TEMPORARY","LOCAL TEMPORARY",
2894  // "ALIAS", "SYNONYM".
2895  //
2896  // Returns:
2897  // TSQLResultSet - each row has a single string column
2898  // that is a table type
2899  // Throws:
2900  // TSQLException - if a database access error occurs
2901 
2902  static MYSQL_FIELD TTYPE_fields[] = {
2903  {"TABLE_TYPE","Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0}};
2904 
2905  gResult->Close();
2907 
2908  gResult->fMYSQL_RES = (MYSQL_RES*) my_malloc(sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2909  gResult->fMYSQL_RES->row_count = 1;
2910  gResult->fMYSQL_RES->fields = TTYPE_fields;
2911  gResult->fMYSQL_RES->field_count = 1;
2912  gResult->fMYSQL_RES->current_field = 0;
2913 
2914  return new TSQLResultSet(0,gResult);
2915 }
2916 
2917 //___________________________________________________________________
2919  const TString& catalog,
2920  const TString& schemaPattern,
2921  const TString& tableNamePattern,
2922  const TString& columnNamePattern )
2923 {
2924  // Gets a description of table columns available in the specified
2925  // catalog.
2926  //
2927  // Only column descriptions matching the catalog, schema,
2928  // table and column name criteria are returned. They are ordered
2929  // by TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION.
2930  //
2931  // Each column description has the following columns:
2932  //
2933  // 1.TABLE_CAT string => table catalog (may be null)
2934  //
2935  // 2.TABLE_SCHEM string => table schema (may be null)
2936  //
2937  // 3.TABLE_NAME string => table name
2938  //
2939  // 4.COLUMN_NAME string => column name
2940  //
2941  // 5.DATA_TYPE short => SQL type from TSQLTypes
2942  //
2943  // 6.TYPE_NAME string => Data source dependent type name,
2944  // for a UDT the type name is fully qualified
2945  //
2946  // 7.COLUMN_SIZE int => column size. For char or date types
2947  // this is the maximum number of characters,
2948  // for numeric or decimal types this is precision.
2949  //
2950  // 8.BUFFER_LENGTH is not used.
2951  //
2952  // 9.DECIMAL_DIGITS int => the number of fractional digits
2953  //
2954  // 10.NUM_PREC_RADIX int => Radix (typically either 10 or 2)
2955  //
2956  // 11.NULLABLE int => is NULL allowed?
2957  //
2958  // kColumnNoNulls - might not allow NULL values
2959  // kColumnNullable - definitely allows NULL values
2960  // kColumnNullableUnknown - nullability unknown
2961  //
2962  // 12.REMARKS string => comment describing column (may be null)
2963  //
2964  // 13.COLUMN_DEF string => default value (may be null)
2965  //
2966  // 14.SQL_DATA_TYPE int => unused
2967  //
2968  // 15.SQL_DATETIME_SUB int => unused
2969  //
2970  // 16.CHAR_OCTET_LENGTH int => for char types the maximum
2971  // number of bytes in the column
2972  //
2973  // 17.ORDINAL_POSITION int => index of column in
2974  // table (starting at 1)
2975  //
2976  // 18.IS_NULLABLE string => "NO" means column definitely
2977  // does not allow NULL values;
2978  // "YES" means the column might allow
2979  // NULL values.
2980  // An empty string means nobody knows.
2981  //
2982  // Parameters:
2983  // catalog - a catalog name;
2984  // "" - retrieves those without a catalog;
2985  // schemaPattern - a schema name pattern;
2986  // "" - retrieves those without a schema
2987  // tableNamePattern - a table name pattern
2988  // columnNamePattern - a column name pattern
2989  //
2990  // Returns:
2991  // TSQLResultSet - each row is a column description
2992  // Throws:
2993  // TSQLException - if a database access error occurs
2994  // See Also:
2995  // GetSearchStringEscape()
2996 
2997  gResult->Close();
2999 
3000  return new TSQLResultSet(0,gResult);
3001 }
3002 
3003 //___________________________________________________________________
3005  const TString& catalog,
3006  const TString& schema,
3007  const TString& table,
3008  const TString& columnNamePattern )
3009 {
3010  // Gets a description of the access rights for a table's columns.
3011  //
3012  // Only privileges matching the column name criteria are
3013  // returned. They are ordered by COLUMN_NAME and PRIVILEGE.
3014  //
3015  // Each privilige description has the following columns:
3016  //
3017  // 1.TABLE_CAT string => table catalog (may be null)
3018  //
3019  // 2.TABLE_SCHEM string => table schema (may be null)
3020  //
3021  // 3.TABLE_NAME string => table name
3022  //
3023  // 4.COLUMN_NAME string => column name
3024  //
3025  // 5.GRANTOR => grantor of access (may be null)
3026  //
3027  // 6.GRANTEE string => grantee of access
3028  //
3029  // 7.PRIVILEGE string => name of access (SELECT, INSERT,
3030  // UPDATE, REFRENCES, ...)
3031  //
3032  // 8.IS_GRANTABLE string => "YES" if grantee is permitted
3033  // to grant to others;
3034  // "NO" if not;
3035  // null if unknown
3036  //
3037  // Parameters:
3038  // catalog - a catalog name;
3039  // "" - retrieves those without a catalog;
3040  // schema - a schema name;
3041  // "" - retrieves those without a schema
3042  // table - a table name
3043  // columnNamePattern - a column name pattern
3044  //
3045  // Returns:
3046  // TSQLResultSet - each row is a column privilege
3047  // description
3048  // Throws:
3049  // TSQLException - if a database access error occurs
3050  // See Also:
3051  // GetSearchStringEscape()
3052 
3053  gResult->Close();
3055 
3056  Throw( new TSQLException("MyODBC doesn't support this yet","08002",4000) );
3057  return 0;
3058 }
3059 
3060 //___________________________________________________________________
3062  const TString& catalog,
3063  const TString& schemaPattern,
3064  const TString& tableNamePattern )
3065 {
3066  // Gets a description of the access rights for each table
3067  // available in a catalog. Note that a table privilege applies
3068  // to one or more columns in the table. It would be wrong to
3069  // assume that this priviledge applies to all columns (this may
3070  // be true for some systems but is not true for all.)
3071  //
3072  // Only privileges matching the schema and table name criteria
3073  // are returned. They are ordered by TABLE_SCHEM, TABLE_NAME,
3074  // and PRIVILEGE.
3075  //
3076  // Each privilige description has the following columns:
3077  //
3078  // 1.TABLE_CAT string => table catalog (may be null)
3079  //
3080  // 2.TABLE_SCHEM string => table schema (may be null)
3081  //
3082  // 3.TABLE_NAME string => table name
3083  //
3084  // 4.GRANTOR => grantor of access (may be null)
3085  //
3086  // 5.GRANTEE string => grantee of access
3087  //
3088  // 6.PRIVILEGE string => name of access (SELECT, INSERT,
3089  // UPDATE, REFRENCES, ...)
3090  //
3091  // 7.IS_GRANTABLE string => "YES" - if grantee is permitted
3092  // to grant to others;
3093  // "NO" - if not;
3094  // null - if unknown
3095  //
3096  // Parameters:
3097  // catalog - a catalog name;
3098  // "" - retrieves those without a catalog;
3099  // schemaPattern - a schema name pattern;
3100  // "" - retrieves those without a schema
3101  // tableNamePattern - a table name pattern
3102  //
3103  // Returns:
3104  // TSQLResultSet - each row is a table privilege
3105  // description
3106  // Throws:
3107  // TSQLException - if a database access error occurs
3108  // See Also:
3109  // GetSearchStringEscape()
3110 
3111  gResult->Close();
3113 
3114  Throw( new TSQLException("MyODBC doesn't support this yet","08002",4000) );
3115  return 0;
3116 }
3117 
3118 //___________________________________________________________________
3120  const TString& catalog,
3121  const TString& schema,
3122  const TString& table,
3123  Int_t scope,
3124  Bool_t nullable )
3125 {
3126  // Gets a description of a table's optimal set of columns that
3127  // uniquely identifies a row. They are ordered by SCOPE.
3128  //
3129  // Each column description has the following columns:
3130  //
3131  // 1.SCOPE short => actual scope of result
3132  //
3133  // kBestRowTemporary - very temporary, while using row
3134  // kBestRowTransaction - valid for remainder of current
3135  // transaction
3136  // kBestRowSession - valid for remainder of current session
3137  //
3138  // 2.COLUMN_NAME string => column name
3139  //
3140  // 3.DATA_TYPE short => SQL data type from TSQLTypes
3141  //
3142  // 4.TYPE_NAME string => Data source dependent type name,
3143  // for a UDT the type name is fully
3144  // qualified
3145  //
3146  // 5.COLUMN_SIZE int => precision
3147  //
3148  // 6.BUFFER_LENGTH int => not used
3149  //
3150  // 7.DECIMAL_DIGITS short => scale
3151  //
3152  // 8.PSEUDO_COLUMN short => is this a pseudo column like
3153  // an Oracle ROWID
3154  //
3155  // kBestRowUnknown - may or may not be pseudo column
3156  // kBestRowNotPseudo - is NOT a pseudo column
3157  // kBestRowPseudo - is a pseudo column
3158  //
3159  // Parameters:
3160  // catalog - a catalog name;
3161  // "" - retrieves those without a catalog;
3162  // schema - a schema name;
3163  // "" - retrieves those without a schema
3164  // table - a table name
3165  // scope - the scope of interest; use same values as SCOPE
3166  // nullable - include columns that are nullable?
3167  //
3168  // Returns:
3169  // TSQLResultSet - each row is a column description
3170  // Throws:
3171  // TSQLException - if a database access error occurs
3172 
3173  gResult->Close();
3175 
3176  return new TSQLResultSet(0,gResult);
3177 }
3178 
3179 //___________________________________________________________________
3181  const TString& catalog,
3182  const TString& schema,
3183  const TString& table )
3184 {
3185  // Gets a description of a table's columns that are automatically
3186  // updated when any value in a row is updated. They are unordered.
3187  //
3188  // Each column description has the following columns:
3189  //
3190  // 1.SCOPE short => is not used
3191  //
3192  // 2.COLUMN_NAME string => column name
3193  //
3194  // 3.DATA_TYPE short => SQL data type from TSQLTypes
3195  //
3196  // 4.TYPE_NAME string => Data source dependent type name
3197  //
3198  // 5.COLUMN_SIZE int => precision
3199  //
3200  // 6.BUFFER_LENGTH int => length of column value in bytes
3201  //
3202  // 7.DECIMAL_DIGITS short => scale
3203  //
3204  // 8.PSEUDO_COLUMN short => is this a pseudo column like
3205  // an Oracle ROWID
3206  //
3207  // kVersionColumnUnknown - may or may not be pseudo column
3208  // kVersionColumnNotPseudo - is NOT a pseudo column
3209  // kVersionColumnPseudo - is a pseudo column
3210  //
3211  // Parameters:
3212  // catalog - a catalog name;
3213  // "" - retrieves those without a catalog;
3214  // schema - a schema name;
3215  // "" retrieves those without a schema
3216  // table - a table name
3217  //
3218  // Returns:
3219  // TSQLResultSet - each row is a column description
3220  // Throws:
3221  // TSQLException - if a database access error occurs
3222 
3223  gResult->Close();
3225 
3226  Throw( new TSQLException("MyODBC doesn't support this yet","08002",4000) );
3227  return 0;
3228 }
3229 
3230 //___________________________________________________________________
3232  const TString& catalog,
3233  const TString& schema,
3234  const TString& table )
3235 {
3236  // Gets a description of a table's primary key columns.
3237  // They are ordered by COLUMN_NAME.
3238  //
3239  // Each primary key column description has the following columns:
3240  //
3241  // 1.TABLE_CAT string => table catalog (may be null)
3242  //
3243  // 2.TABLE_SCHEM string => table schema (may be null)
3244  //
3245  // 3.TABLE_NAME string => table name
3246  //
3247  // 4.COLUMN_NAME string => column name
3248  //
3249  // 5.KEY_SEQ short => sequence number within primary key
3250  //
3251  // 6.PK_NAME string => primary key name (may be null)
3252  //
3253  // Parameters:
3254  // catalog - a catalog name;
3255  // "" - retrieves those without a catalog;
3256  // schema - a schema name;
3257  // "" - retrieves those without a schema
3258  // table - a table name
3259  //
3260  // Returns:
3261  // TSQLResultSet - each row is a primary key column
3262  // description
3263  // Throws:
3264  // TSQLException - if a database access error occurs
3265 
3266  gResult->Close();
3268 
3269  return new TSQLResultSet(0,gResult);
3270 }
3271 
3272 //___________________________________________________________________
3274  const TString& catalog,
3275  const TString& schema,
3276  const TString& table )
3277 {
3278  // Gets a description of the primary key columns that are
3279  // referenced by a table's foreign key columns (the primary keys
3280  // imported by a table). They are ordered by PKTABLE_CAT,
3281  // PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
3282  //
3283  // Each primary key column description has the following columns:
3284  //
3285  // 1.PKTABLE_CAT string => primary key table catalog being
3286  // imported (may be null)
3287  //
3288  // 2.PKTABLE_SCHEM string => primary key table schema being
3289  // imported (may be null)
3290  //
3291  // 3.PKTABLE_NAME string => primary key table name being
3292  // imported
3293  //
3294  // 4.PKCOLUMN_NAME string => primary key column name being
3295  // imported
3296  //
3297  // 5.FKTABLE_CAT string => foreign key table catalog
3298  // (may be null)
3299  //
3300  // 6.FKTABLE_SCHEM string => foreign key table schema
3301  // (may be null)
3302  //
3303  // 7.FKTABLE_NAME string => foreign key table name
3304  //
3305  // 8.FKCOLUMN_NAME string => foreign key column name
3306  //
3307  // 9.KEY_SEQ short => sequence number within foreign key
3308  //
3309  // 10.UPDATE_RULE short => What happens to foreign key when
3310  // primary is updated:
3311  //
3312  // kImportedNoAction - do not allow update of primary key
3313  // if it has been imported
3314  // kImportedKeyCascade - change imported key to agree
3315  // with primary key update
3316  // kImportedKeySetNull - change imported key to NULL if
3317  // its primary key has been updated
3318  // kImportedKeySetDefault - change imported key to default
3319  // values if its primary key has
3320  // been updated
3321  // kImportedKeyRestrict - same as kImportedKeyNoAction
3322  //
3323  // 11.DELETE_RULE short => What happens to the foreign key
3324  // when primary is deleted:
3325  //
3326  // kImportedKeyNoAction - do not allow delete of primary
3327  // key if it has been imported
3328  // kImportedKeyCascade - delete rows that import a
3329  // deleted key
3330  // kImportedKeySetNull - change imported key to NULL
3331  // if its primary key has been deleted
3332  // kImportedKeyRestrict - same as kImportedKeyNoAction
3333  // kImportedKeySetDefault - change imported key to default
3334  // if its primary key has been deleted
3335  //
3336  // 12.FK_NAME string => foreign key name (may be null)
3337  //
3338  // 13.PK_NAME string => primary key name (may be null)
3339  //
3340  // 14.DEFERRABILITY short => can the evaluation of foreign key
3341  // constraints be deferred until commit
3342  //
3343  // kImportedKeyInitiallyDeferred - see SQL92 for definition
3344  // kImportedKeyInitiallyImmediate - see SQL92 for definition
3345  // kImportedKeyNotDeferrable - see SQL92 for definition
3346  //
3347  // Parameters:
3348  // catalog - a catalog name;
3349  // "" - retrieves those without a catalog;
3350  // schema - a schema name;
3351  // "" - retrieves those without a schema
3352  // table - a table name
3353  //
3354  // Returns:
3355  // TSQLResultSet - each row is a primary key column description
3356  // Throws:
3357  // TSQLException - if a database access error occurs
3358  // See Also:
3359  // GetExportedKeys(const TString&,
3360  // const TString&,
3361  // const TString&)
3362 
3363  return GetCrossReference("","","",catalog,schema,table);
3364 }
3365 
3366 //___________________________________________________________________
3368  const TString& catalog,
3369  const TString& schema,
3370  const TString& table )
3371 {
3372  // Gets a description of the foreign key columns that reference
3373  // a table's primary key columns (the foreign keys exported by
3374  // a table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
3375  // FKTABLE_NAME, and KEY_SEQ.
3376  //
3377  // Each foreign key column description has the following columns:
3378  //
3379  // 1.PKTABLE_CAT string => primary key table catalog (may be null)
3380  //
3381  // 2.PKTABLE_SCHEM string => primary key table schema (may be null)
3382  //
3383  // 3.PKTABLE_NAME string => primary key table name
3384  //
3385  // 4.PKCOLUMN_NAME string => primary key column name
3386  //
3387  // 5.FKTABLE_CAT string => foreign key table catalog (may be
3388  // null) being exported (may be null)
3389  //
3390  // 6.FKTABLE_SCHEM string => foreign key table schema (may be
3391  // null) being exported (may be null)
3392  // 7.FKTABLE_NAME string => foreign key table name being exported
3393  //
3394  // 8.FKCOLUMN_NAME string => foreign key column name being exported
3395  //
3396  // 9.KEY_SEQ short => sequence number within foreign key
3397  //
3398  // 10.UPDATE_RULE short => What happens to foreign key when
3399  // primary is updated:
3400  //
3401  // kImportedNoAction - do not allow update of primary
3402  // key if it has been imported
3403  // kImportedKeyCascade - change imported key to agree
3404  // with primary key update
3405  // kImportedKeySetNull - change imported key to NULL
3406  // if its primary key has been updated
3407  // kImportedKeySetDefault - change imported key to default
3408  // values if its primary key has been
3409  // updated
3410  // kImportedKeyRestrict - same as kImportedKeyNoAction
3411  //
3412  // 11.DELETE_RULE short => What happens to the foreign key
3413  // when primary is deleted:
3414  //
3415  // kImportedKeyNoAction - do not allow delete of primary
3416  // key if it has been imported
3417  // kImportedKeyCascade - delete rows that import a
3418  // deleted key
3419  // kImportedKeySetNull - change imported key to NULL if
3420  // its primary key has been deleted
3421  // kImportedKeyRestrict - same as kImportedKeyNoAction
3422  // kImportedKeySetDefault - change imported key to default
3423  // if its primary key has been
3424  // deleted
3425  //
3426  // 12.FK_NAME string => foreign key name (may be null)
3427  //
3428  // 13.PK_NAME string => primary key name (may be null)
3429  //
3430  // 14.DEFERRABILITY short => can the evaluation of foreign key
3431  // constraints be deferred until commit
3432  //
3433  // kImportedKeyInitiallyDeferred - see SQL92 for definition
3434  // kImportedKeyInitiallyImmediate - see SQL92 for definition
3435  // kImportedKeyNotDeferrable - see SQL92 for definition
3436  //
3437  // Parameters:
3438  // catalog - a catalog name;
3439  // "" - retrieves those without a catalog;
3440  // schema - a schema name;
3441  // "" - retrieves those without a schema
3442  // table - a table name
3443  //
3444  // Returns:
3445  // TSQLResultSet - each row is a foreign key column
3446  // description
3447  // Throws:
3448  // TSQLException - if a database access error occurs
3449  // See Also:
3450  // GetImportedKeys( const TString&,
3451  // const TString&,
3452  // const TString& )
3453 
3454  gResult->Close();
3456 
3457  return GetCrossReference(catalog,schema,table,"","","");
3458 }
3459 
3460 //___________________________________________________________________
3462  const TString& primaryCatalog,
3463  const TString& primarySchema,
3464  const TString& primaryTable,
3465  const TString& foreignCatalog,
3466  const TString& foreignSchema,
3467  const TString& foreignTable )
3468 {
3469  // Gets a description of the foreign key columns in the foreign
3470  // key table that reference the primary key columns of the primary
3471  // key table (describe how one table imports another's key.)
3472  // This should normally return a single foreign key/primary key
3473  // pair (most tables only import a foreign key from a table once.)
3474  // They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME,
3475  // and KEY_SEQ.
3476  //
3477  // Each foreign key column description has the following columns:
3478  //
3479  // 1.PKTABLE_CAT string => primary key table catalog (may be null)
3480  //
3481  // 2.PKTABLE_SCHEM string => primary key table schema (may be null)
3482  //
3483  // 3.PKTABLE_NAME string => primary key table name
3484  //
3485  // 4.PKCOLUMN_NAME string => primary key column name
3486  //
3487  // 5.FKTABLE_CAT string => foreign key table catalog (may be null)
3488  // being exported (may be null)
3489  //
3490  // 6.FKTABLE_SCHEM string => foreign key table schema (may be null)
3491  // being exported (may be null)
3492  //
3493  // 7.FKTABLE_NAME string => foreign key table name being exported
3494  //
3495  // 8.FKCOLUMN_NAME string => foreign key column name
3496  // being exported
3497  //
3498  // 9.KEY_SEQ short => sequence number within foreign key
3499  //
3500  // 10.UPDATE_RULE short => What happens to foreign key when
3501  // primary is updated:
3502  //
3503  // kImportedNoAction - do not allow update of primary key
3504  // if it has been imported
3505  // kImportedKeyCascade - change imported key to agree
3506  // with primary key update
3507  // kImportedKeySetNull - change imported key to NULL
3508  // if its primary key has been updated
3509  // kImportedKeySetDefault - change imported key to
3510  // default values if its primary key
3511  // has been updated
3512  // kImportedKeyRestrict - same as kImportedKeyNoAction
3513  //
3514  // 11.DELETE_RULE short => What happens to the foreign key
3515  // when primary is deleted
3516  //
3517  // kImportedKeyNoAction - do not allow delete of primary
3518  // key if it has been imported
3519  // kImportedKeyCascade - delete rows that import
3520  // a deleted key
3521  // kImportedKeySetNull - change imported key to NULL if
3522  // its primary key has been deleted
3523  // kImportedKeyRestrict - same as kImportedKeyNoAction
3524  // kImportedKeySetDefault - change imported key to
3525  // default if its primary key has
3526  // been deleted
3527  //
3528  // 12.FK_NAME string => foreign key name (may be null)
3529  //
3530  // 13.PK_NAME string => primary key name (may be null)
3531  //
3532  // 14.DEFERRABILITY short => can the evaluation of foreign
3533  // key constraints be deferred until
3534  // commit
3535  //
3536  // kImportedKeyInitiallyDeferred - see SQL92 for definition
3537  // kImportedKeyInitiallyImmediate - see SQL92 for definition
3538  // kImportedKeyNotDeferrable - see SQL92 for definition
3539  //
3540  // Parameters:
3541  // primaryCatalog - a catalog name;
3542  // "" - retrieves those without a catalog;
3543  // primarySchema - a schema name;
3544  // "" - retrieves those without a schema
3545  // primaryTable - the table name that exports the key
3546  // foreignCatalog - a catalog name;
3547  // "" - retrieves those without a catalog;
3548  // foreignSchema - a schema name;
3549  // "" - retrieves those without a schema
3550  // foreignTable - the table name that imports the key
3551  //
3552  // Returns:
3553  // TSQLResultSet - each row is a foreign key column
3554  // description
3555  // Throws:
3556  // TSQLException - if a database access error occurs
3557  // See Also:
3558  // GetImportedKeys( const TString&,
3559  // const TString&,
3560  // const TString& )
3561 
3562  gResult->Close();
3564 
3565 }
3566 
3567 //___________________________________________________________________
3569 {
3570  // Gets a description of all the standard SQL types supported
3571  // by this database. They are ordered by DATA_TYPE and then by
3572  // how closely the data type maps to the corresponding SQL type.
3573  //
3574  // Each type description has the following columns:
3575  //
3576  // 1.TYPE_NAME string => Type name
3577  //
3578  // 2.DATA_TYPE short => SQL data type from TSQLTypes
3579  //
3580  // 3.PRECISION int => maximum precision
3581  //
3582  // 4.LITERAL_PREFIX string => prefix used to quote a
3583  // literal (may be null)
3584  //
3585  // 5.LITERAL_SUFFIX string => suffix used to quote a
3586  // literal (may be null)
3587  //
3588  // 6.CREATE_PARAMS string => parameters used in creating
3589  // the type (may be null)
3590  //
3591  // 7.NULLABLE short => can you use NULL for this type?
3592  //
3593  // kTypeNoNulls - does not allow NULL values
3594  // kTypeNullable - allows NULL values
3595  // kTypeNullableUnknown - nullability unknown
3596  //
3597  // 8.CASE_SENSITIVE boolean=> is it case sensitive?
3598  //
3599  // 9.SEARCHABLE short => can you use "WHERE" based on
3600  // this type:
3601  //
3602  // kTypePredNone - No support
3603  // kTypePredChar - Only supported with WHERE .. LIKE
3604  // kTypePredBasic - Supported except for WHERE .. LIKE
3605  // kTypeSearchable - Supported for all WHERE ..
3606  //
3607  // 10.UNSIGNED_ATTRIBUTE => is it unsigned?
3608  //
3609  // 11.FIXED_PREC_SCALE => can it be a money value?
3610  //
3611  // 12.AUTO_INCREMENT => can it be used for an auto-increment
3612  // value?
3613  //
3614  // 13.LOCAL_TYPE_NAME string => localized version of type
3615  // name (may be null)
3616  //
3617  // 14.MINIMUM_SCALE short => minimum scale supported
3618  //
3619  // 15.MAXIMUM_SCALE short => maximum scale supported
3620  //
3621  // 16.SQL_DATA_TYPE int => unused
3622  //
3623  // 17.SQL_DATETIME_SUB int => unused
3624  //
3625  // 18.NUM_PREC_RADIX int => usually 2 or 10
3626  //
3627  // Returns:
3628  // TSQLResultSet - each row is a SQL type description
3629  // Throws:
3630  // TSQLException - if a database access error occurs
3631 
3632  gResult->Close();
3634 
3635  return new TSQLResultSet(0,gResult);
3636 }
3637 
3638 //___________________________________________________________________
3640  const TString& catalog,
3641  const TString& schema,
3642  const TString& table,
3643  Bool_t unique,
3644  Bool_t approximate )
3645 {
3646  // Gets a description of a table's indices and statistics.
3647  // They are ordered by NON_UNIQUE, TYPE, INDEX_NAME,
3648  // and ORDINAL_POSITION.
3649  //
3650  // Each index column description has the following columns:
3651  //
3652  // 1.TABLE_CAT string => table catalog (may be null)
3653  //
3654  // 2.TABLE_SCHEM string => table schema (may be null)
3655  //
3656  // 3.TABLE_NAME string => table name
3657  //
3658  // 4.NON_UNIQUE => Can index values be non-unique?
3659  // kFALSE when TYPE is kTableIndexStatistic
3660  //
3661  // 5.INDEX_QUALIFIER string => index catalog (may be null);
3662  // null when TYPE is kTableIndexStatistic
3663  //
3664  // 6.INDEX_NAME string => index name; null when TYPE
3665  // is kTableIndexStatistic
3666  //
3667  // 7.TYPE short => index type:
3668  //
3669  // kTableIndexStatistic - this identifies table
3670  // statistics that are returned
3671  // in conjuction with a table's
3672  // index descriptions
3673  //
3674  // kTableIndexClustered - this is a clustered index
3675  // kTableIndexHashed - this is a hashed index
3676  // kTableIndexOther - this is some other style of index
3677  //
3678  // 8.ORDINAL_POSITION short => column sequence number within
3679  // index; zero when TYPE is
3680  // kTableIndexStatistic
3681  //
3682  // 9.COLUMN_NAME string => column name; null when TYPE is
3683  // kTableIndexStatistic
3684  //
3685  // 10.ASC_OR_DESC string => column sort sequence,
3686  //
3687  // "A" => ascending,
3688  // "D" => descending, may be null if
3689  // sort sequence is not supported;
3690  // null => when TYPE is kTableIndexStatistic
3691  //
3692  // 11.CARDINALITY int => When TYPE is kTableIndexStatistic,
3693  // then this is the number of rows in
3694  // the table; otherwise, it is the number
3695  // of unique values in the index.
3696  //
3697  // 12.PAGES int => When TYPE is kTableIndexStatisic then
3698  // this is the number of pages used for
3699  // the table, otherwise it is the number
3700  // of pages used for the current index.
3701  //
3702  // 13.FILTER_CONDITION string => Filter condition, if any
3703  // (may be null)
3704  //
3705  // Parameters:
3706  // catalog - a catalog name;
3707  // "" - retrieves those without a catalog;
3708  // schema - a schema name;
3709  // "" - retrieves those without a schema
3710  // table - a table name
3711  // unique - when kTRUE, return only indices for unique
3712  // values; when kFALSE, return indices
3713  // regardless of whether unique or not
3714  // approximate - when kTRUE, result is allowed to reflect
3715  // approximate or out of data values;
3716  // when kFALSE, results are requested to
3717  // be accurate
3718  //
3719  // Returns:
3720  // TSQLResultSet - each row is an index column description
3721  // Throws:
3722  // TSQLException - if a database access error occurs
3723 
3724  gResult->Close();
3726 
3727  static MYSQL_FIELD SQLSTAT_fields[] = {
3728  {"TABLE_CAT","MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
3729  {"TABLE_SCHEM","MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
3730  {"TABLE_NAME","MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,NAME_LEN,NOT_NULL_FLAG},
3731  {"NON_UNIQUE","MySQL_Stat",NULL,FIELD_TYPE_SHORT,1,1,NOT_NULL_FLAG},
3732  {"NDEX_QUALIFIER","MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
3733  {"INDEX_NAME","MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,NAME_LEN},
3734  {"TYPE","MySQL_Stat",NULL,FIELD_TYPE_SHORT,1,1,NOT_NULL_FLAG},
3735  {"ORDINAL_POSITION","MySQL_Stat",NULL,FIELD_TYPE_SHORT,1,2,NOT_NULL_FLAG},
3736  {"COLUMN_NAME","MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,NAME_LEN,NOT_NULL_FLAG},
3737  {"ASC_OR_DESC","MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,1,1},
3738  {"CARDINALITY","MySQL_Stat",NULL,FIELD_TYPE_LONG,11,11},
3739  {"PAGES","MySQL_Stat",NULL,FIELD_TYPE_LONG,9,9},
3740  {"FILTER_CONDITION","MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,10,10},
3741  };
3742 
3743  const Int_t SQLSTAT_FIELDS=array_elements(SQLSTAT_fields);
3744 
3745  return new TSQLResultSet(0,gResult);
3746 }
3747 
3748 //___________________________________________________________________
3750 {
3751  // Does the database support the given result set type?
3752  //
3753  // Parameters:
3754  // type - defined in TSQLResultSet::kTYPE_XXX
3755  //
3756  // Returns:
3757  // kTRUE if so; kFALSE otherwise
3758  // Throws:
3759  // TSQLException - if a database access error occurs
3760  // See Also:
3761  // TSQLResultSet
3762 
3763  return ( (type==kTYPE_SCROLL_INSENSITIVE) || (type==kTYPE_FORWARD_ONLY) );
3764 }
3765 
3766 //___________________________________________________________________
3768  Int_t concurrency )
3769 {
3770  // Does the database support the concurrency type in combination
3771  // with the given result set type?
3772  //
3773  // Parameters:
3774  // type - defined in TSQLResultSet
3775  // concurrency - type defined in TSQLResultSet
3776  //
3777  // Returns:
3778  // kTRUE if so; kFALSE otherwise
3779  // Throws:
3780  // TSQLException - if a database access error occurs
3781  // See Also:
3782  // TSQLConnection TSQLResultSet
3783 
3784  return (type == kTYPE_SCROLL_SENSITIVE &&
3785  concurrency == kCONCUR_READ_ONLY);
3786 }
3787 
3788 //___________________________________________________________________
3790 {
3791  // Indicates whether a result set's own updates are visible.
3792  //
3793  // Parameters:
3794  // resultset type, i.e. TSQLResultSet::kTYPE_XXX
3795  //
3796  // Returns:
3797  // kTRUE if updates are visible for the result set type;
3798  // kFALSE otherwise
3799  // Throws:
3800  // TSQLException - if a database access error occurs
3801  //
3802  // see also TSQLResultSet
3803 
3804  Bool_t return_value = kFALSE;
3805  return return_value;
3806 }
3807 
3808 //___________________________________________________________________
3810 {
3811  // Indicates whether a result set's own deletes are visible.
3812  //
3813  // Parameters:
3814  // resultset type, i.e. TSQLResultSet::kTYPE_XXX
3815  //
3816  // Returns:
3817  // kTRUE if deletes are visible for the result set type;
3818  // kFALSE otherwise
3819  // Throws:
3820  // TSQLException - if a database access error occurs
3821  //
3822  // see also TSQLResultSet
3823 
3824  return kFALSE;
3825 }
3826 
3827 //___________________________________________________________________
3829 {
3830  // Indicates whether a result set's own inserts are visible.
3831  //
3832  // Parameters:
3833  // resultset type, i.e. TSQLResultSet::kTYPE_XXX
3834  //
3835  // Returns:
3836  // kTRUE if inserts are visible for the result set type;
3837  // kFALSE otherwise
3838  // Throws:
3839  // TSQLException - if a database access error occurs
3840  //
3841  // see also TSQLResultSet
3842 
3843  return kFALSE;
3844 }
3845 
3846 //___________________________________________________________________
3848 {
3849  // Indicates whether updates made by others are visible.
3850  //
3851  // Parameters:
3852  // resultset type, i.e. TSQLResultSet::kTYPE_XXX.
3853  //
3854  // Returns:
3855  // kTRUE if updates made by others are visible for
3856  // the result set type; kFALSE otherwise
3857  // Throws:
3858  // TSQLException - if a database access error occurs
3859 
3860  return kFALSE;
3861 }
3862 
3863 //___________________________________________________________________
3865 {
3866  // Indicates whether deletes made by others are visible.
3867  //
3868  // Parameters:
3869  // resultset type, i.e. TSQLResultSet::kTYPE_XXX
3870  //
3871  // Returns:
3872  // kTRUE if deletes made by others are visible for the
3873  // result set type; kFALSE otherwise
3874  // Throws:
3875  // TSQLException - if a database access error occurs
3876 
3877  return kFALSE;
3878 }
3879 
3880 //___________________________________________________________________
3882 {
3883  // Indicates whether inserts made by others are visible.
3884  //
3885  // Parameters:
3886  // resultset type, i.e. TSQLResultSet::kTYPE_XXX
3887  //
3888  // Returns:
3889  // kTRUE if updates are visible for the result set type
3890  // Throws:
3891  // TSQLException - if a database access error occurs
3892 
3893  return kFALSE;
3894 }
3895 
3896 //___________________________________________________________________
3898 {
3899  // Indicates whether or not a visible row update can be detected
3900  // by calling the method TSQLResultSet::RowUpdated().
3901  //
3902  // Parameters:
3903  // resultset type, i.e. TSQLResultSet::kTYPE_XXX
3904  //
3905  // Returns:
3906  // kTRUE if changes are detected by the result set type;
3907  // kFALSE otherwise
3908  // Throws:
3909  // TSQLException - if a database access error occurs
3910 
3911  return kFALSE;
3912 }
3913 
3914 //___________________________________________________________________
3916 {
3917  // Indicates whether or not a visible row delete
3918  // can be detected by calling TSQLResultSet::RowDeleted().
3919  // If DeletesAreDetected() returns kFALSE, then deleted rows are
3920  // removed from the result set.
3921  //
3922  // Parameters:
3923  // resultset type, i.e. TSQLResultSet::kTYPE_XXX
3924  //
3925  // Returns:
3926  // kTRUE if changes are detected by the resultset type
3927  // Throws:
3928  // TSQLException - if a database access error occurs
3929 
3930  return kFALSE;
3931 }
3932 
3933 //___________________________________________________________________
3935 {
3936  // Indicates whether or not a visible row insert
3937  // can be detected by calling TSQLResultSet::RowInserted().
3938  //
3939  // Parameters:
3940  // resultset type, i.e. TSQLResultSet::kTYPE_XXX
3941  //
3942  // Returns:
3943  // kTRUE if changes are detected by the resultset type
3944  // Throws:
3945  // TSQLException - if a database access error occurs
3946 
3947  return kFALSE;
3948 }
3949 
3950 //___________________________________________________________________
3952 {
3953  // Indicates whether the driver supports batch updates.
3954  //
3955  // Returns:
3956  // kTRUE if the driver supports batch updates;
3957  // kFALSE otherwise
3958 
3959  return kFALSE;
3960 }