You can use the functions described here to find out information about the remote datasources that you are using. These could be especially useful in Virtuoso PL later on if you are not able to know everything about the remote tables ahead of time for the ATTACH TABLE statement. statement
These SQL functions correspond to the ODBC catalog calls of similar name. These are used to access the data dictionary of remote data sources inside the ATTACH TABLE process.
The dsn argument must refer to a dsn previously defined by vd_remote_data_source or ATTACH TABLE.
For instance, the qualifier argument corresponds to the szTableQualifier and cbTableQualifier arguments of an ODBC catalog function. A SQL NULL value corresponds to the C NULL value. The arguments can contain % signs, which are interpreted as in LIKE.
These functions return an array, with one element for each row of the result set. Each row is represented as an array with one element for each column.
As defined in ODBC API for the corresponding catalog call.
An array, with one element for each row of the result set. Each row is represented as an array with one element for each column.
dbg_obj_print (sql_primary_keys ('Local Virtuoso', 'Demo', NULL, 'Orders')); -> ( ("Demo" "demo" "Orders" "OrderID" 1 "Orders" "Demo" "demo" "Orders" ) )
sql_data_sources, sql_columns sql_gettypeinfo, sql_statistics, sql_tables.