<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
 <channel>
  <title>Database Event Hooks</title>
  <link>http://docs.openlinksw.com/virtuoso/hooks.html</link>
  <description>OpenLink Virtuoso Universal Server: Documentation</description>
  <managingEditor>virtuoso.docs@openlinksw.com</managingEditor>
  <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
  <generator>OpenLink Software Documentation Team</generator>
  <webMaster>webmaster@openlinksw.com</webMaster>
  <image>
    <title>OpenLink Virtuoso Universal Server: Documentation</title>
    <url>http://docs.openlinksw.com/virtuoso/../images/misc/logo.jpg</url>
    <link>http://docs.openlinksw.com/virtuoso/hooks.html</link>
    <description>OpenLink Virtuoso Universal Server: Documentation</description>
  </image>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/fn_dbev_startup.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>Database Startup</category>
    <link>http://docs.openlinksw.com/virtuoso/fn_dbev_startup.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>Database Startup</title>
    <description>DB.DBA.DBEV_STARTUP()


If defined, this is called after the server initialization, including
roll forward of transaction logs, compilation of stored procedures, etc...,
but before starting to listen for clients.  Hence this is guaranteed
to run before any clients connect or any HTTP messages are serviced.



The procedure will run in its own transaction, which will be
automatically committed upon return, regardless of run time errors.
Result sets are not allowed and return values are discarded.
All custom Virtuoso Server Extensions (VSEs) will be defined when calling this procedure.


</description>
  </item>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/fn_dbev_connect.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>Database Connections</category>
    <link>http://docs.openlinksw.com/virtuoso/fn_dbev_connect.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>Database Connections</title>
    <description>DB.DBA.DBEV_CONNECT()


If defined, this hook is called for each successful ODBC
or JDBC connection.  The hook is only called after password and
license checks have passed.  The hook is called before the server acknowledges a
successful connect and is therefore guaranteed to run before any other action
by the connected client.



The function runs in its own transaction, which is automatically committed following
successful return.  Result sets may not be generated and return values are discarded.
The connection_id () and user are defined in the function.
SQL states signalled inside this hook will be sent to the client and will cause the
connection to be closed server side.


</description>
  </item>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/fn_logins.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>Database Logins</category>
    <link>http://docs.openlinksw.com/virtuoso/fn_logins.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>Database Logins</title>
    <description>DB.DBA.DBEV_LOGIN
    inout user_name varchar
    in digest varchar
    in session_random varchar
    

This function, if defined, will always be called by Virtuoso just before
a client is authenticated against the Virtuoso Server.  Three parameters
are available for audit purposes or any other pre-processing purpose totally
user definable.

This hook can be used to control how Virtuoso proceeds with the client login
by responding to 3 possible return values:

</description>
  </item>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/fn_disconnect.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>Database Disconnections</category>
    <link>http://docs.openlinksw.com/virtuoso/fn_disconnect.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>Database Disconnections</title>
    <description>DB.DBA.DBEV_DISCONNECT()


If defined, this procedure is called after a connection
has been found to be disconnected, either as a result of the client  process disconnecting,
the client process terminating or the server deciding
to disconnect, see disconnect_user().
This will also be called if the DBEV_CONNECT hook signals an error, leading to the connection being closed
during the connect sequence.



All activity on behalf of the disconnecting client is terminated by the time this
function is called.  This function runs in its own transaction.
Result sets are prohibited, return values discarded and errors are
logged in the error log file but not otherwise processed.  The transaction is
committed regardless of errors.  The user and connection_id and any connection variables are defined
during this hook.


</description>
  </item>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/fn_dbev_shutdown.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>Database Shutdown</category>
    <link>http://docs.openlinksw.com/virtuoso/fn_dbev_shutdown.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>Database Shutdown</title>
    <description>DB.DBA.DBEV_SHUTDOWN()


If defined, this function is called when shutting down the server,
following disconnection of all clients and making a checkpoint.  When
a disconnect occurs as a result of server shutdown the DBEV_DISCONNECT hook is not called
and this function is expected to perform any logout processing.
The rationale is that all disconnect hooks would be called at the same time,
creating likely deadlocks, resource contention and there could be no
guarantee of time consumed by them or of even whether
they would terminate at all.



The shutdown will do a checkpoint before calling this hook.  This checkpoint
will terminate all transactions with a deadlock state.  If transactions
contain automatic retries, etc...,  we cannot guarantee that all activity would
have terminated when this hook starts.  However, the hook function can try


</description>
  </item>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/fn_dbev_prepare.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>SQL Statement Preparation</category>
    <link>http://docs.openlinksw.com/virtuoso/fn_dbev_prepare.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>SQL Statement Preparation</title>
    <description>
    DB.DBA.DBEV_PREPARE(inout tree any)



If defined, this function is called after parsing any dynamic SQL
statements by any users.  The parse tree will be a
syntactically correct SQL parse tree.  The user and connection variables are defined.
The hook should not produce a result set and any return values are discarded.
The function runs in the transaction which is current on the connection and
the transaction is not automatically committed, so that the hook does not
modify application transaction boundaries.



The tree may be modified by replacing it with any other correct parse tree
or destructively splicing it.  The tree is a regular SQL heterogeneous array.
If the tree is modified incorrectly, it is probable that the server will crash.


</description>
  </item>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/sqlparsetree.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>SQL Parse Tree</category>
    <link>http://docs.openlinksw.com/virtuoso/sqlparsetree.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>SQL Parse Tree</title>
    <description>
The SQL parse tree is composed of DV_ARRAY_OF_POINTER boxes.  Other types of
boxes may occur as leaves, where they are interpreted as literals.  All nodes&#39;
first element (index 0) is the type of the node, one of the constants in sqlparext.h.



The nodes&#39; various fields can be accessed through the data members of the
sql_tree_t union.  Most data members are pointers to the same type.  Sometimes they
are double pointers, denoting a variable length array of pointers to the struct.
The caddr_t type is used to denote a terminal, like a string or other constant.
The types are only for declarative value, the entire structure is a self describing,
run time typed tree of boxes.



The correspondence of the tree to the SQL syntax is documented by the yacc grammar
supplied as appendix.


</description>
  </item>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/fn_davlogins.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>WebDAV Logins</category>
    <link>http://docs.openlinksw.com/virtuoso/fn_davlogins.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>WebDAV Logins</title>
    <description>DB.DBA.DBEV_DAV_LOGIN
    inout user_name varchar
    in password varchar
    in http_auth any
    

This function, if defined, will always be called by Virtuoso just before
a HTTP client is authenticated against the WebDAV Server.  Three parameters
are available for audit purposes or any other pre-processing purpose totally
user definable.


    The data structure of the http_auth is an array
    containing name/value pairs as described below.


</description>
  </item>
  <item>
    <guid>http://docs.openlinksw.com/virtuoso/assocauxdata.html</guid>
    <author>virtuoso.docs@openlinksw.com</author>
    <category>Associating Auxiliary Data With A Connection</category>
    <link>http://docs.openlinksw.com/virtuoso/assocauxdata.html</link>
    <pubDate>Mon, 16 Nov 2009 14:26:59 GMT</pubDate>
    <title>Associating Auxiliary Data With A Connection</title>
    <description>The following functions allow you to set and retrieve connection variables:

</description>
  </item>
 </channel>
</rss>
