Update of /cvsroot/q-lang/q/modules/odbc
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23844
Modified Files:
README-ODBC
Log Message:
update README
Index: README-ODBC
===================================================================
RCS file: /cvsroot/q-lang/q/modules/odbc/README-ODBC,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** README-ODBC 14 Feb 2008 01:14:14 -0000 1.2
--- README-ODBC 16 Feb 2008 06:53:46 -0000 1.3
***************
*** 119,130 ****
==> odbc_info DB
! ("myodbc","test","MySQL","3.23.55-Max-log","myodbc.dll","2.50.39","02.50",
! "03.80")
! As of Q 7.11, a bunch of additional meta information is available using the
! odbc_getinfo function which provides a direct interface to the SQLGetInfo()
! routine. The result of odbc_getinfo is a byte string which can be converted to
! an integer or string value, depending on the type of information requested.
! For instance:
==> bint $ odbc_getinfo DB SQL_MAX_TABLES_IN_SELECT
--- 119,130 ----
==> odbc_info DB
! ("myodbc","test","MySQL","5.0.18","myodbc3.dll","03.51.12","03.51","03.52")
! As of Q 7.11, the odbc module now provides a number of new operations to
! retrieve a bunch of additional meta information about the given database
! connection. In particular, the odbc_getinfo function provides a direct
! interface to the SQLGetInfo() routine. The result of odbc_getinfo is a byte
! string which can be converted to an integer or string value, depending on the
! type of information requested. For instance:
==> bint $ odbc_getinfo DB SQL_MAX_TABLES_IN_SELECT
***************
*** 134,137 ****
--- 134,168 ----
"`"
+ Information about supported SQL data types is available with the odbc_typeinfo
+ routine (this returns a lot of data, see odbc.q for an explanation):
+
+ ==> odbc_typeinfo DB SQL_ALL_TYPES
+
+ Moreover, information about the tables in the current database, as well as the
+ structure of the tables and their primary and foreign keys can be retrieved
+ with the odbc_tables, odbc_columns, odbc_primary_keys and odbc_foreign_keys
+ functions:
+
+ ==> odbc_tables DB
+ [("event","TABLE"),("pet","TABLE")]
+
+ ==> odbc_columns DB "pet"
+ [("name","varchar","NO","''"),("owner","varchar","YES",()),
+ ("species","varchar","YES",()),("sex","char","YES",()),
+ ("birth","date","YES",()),("death","date","YES",())]
+
+ ==> odbc_primary_keys DB "pet"
+ ["name"]
+
+ ==> odbc_foreign_keys DB "event"
+ [("name","pet","name")]
+
+ This often provides a convenient and portable means to retrieve basic
+ information about table structures, at least on RDBMS which properly implement
+ the corresponding ODBC calls (which unfortunately isn't the case for all ODBC
+ drivers yet). Also note that while this information is also available through
+ special system catalogs in most databases, the details of accessing these vary
+ a lot among implementations.
+
EXECUTING SQL QUERIES
|