|Did you know ...||Search Documentation:|
cql_access_token_hook(+AccessToken, -UserId)can be defined to map the generic’AccessToken' passed to cql_transaction/3 to a user ID. If not defined, the AccessToken is assumed to be the user ID. This UserID is used in logging.
cql_execution_hook(+Statement, +OdbcParameters, +OdbcParameterDataTypes, -Row)can be defined if you want to implement the exeuction yourself (for example, to add extra debugging)
cql_log_hook(+Topics, +Level, +Format, +Args)can be defined to redirect CQL logging.
sql_gripe_hook(+Level, +Format, +Args)is called when suspect SQL is found by the SQL parser
cql_normalize_atom_hook(+DBMS, +ApplciationAtom, -DBMSAtom)can be used to create a map for atoms in a specific DBMS. For example, your schema may have arbitrarily long table names, but your DBMS may only allow names up to 64 bytes long. In this case, you can create a scheme for mapping the application-level atom to the DBMS. Other uses include deleting or normalizing illegal characters in names
cql_error_hook(+ErrorId, +Format, +Args)can be defined to generate a specific exception term from the given arguments. If not defined (or if it does not throw an exception, or fails), you will get
cql_max_db_connections_hook(-Max)can be defined to limit the number of simultaneous connections each thread will attempt to have
odbc_connection_complete_hook(+Schema, +Details, +Connection)can be hooked if you want to know every time a connection is made
cql_transaction_info_hook(+AccessToken, +Connection, +DBMS, +Goal, -Info)can be defined if you want to define any application-defined information on a per-transaction level. This can be recovered via
database_transaction_query_info(?ThreadId, ?Goal, ?Info).