dbcore
Vars | |
all_queries | All the current queries that exist. |
---|---|
all_queries_num | Number of all queries, reset to 0 when logged in SStime_track. Used by SStime_track |
failed_connection_timeout | world.time that connection attempts can resume |
failed_connection_timeout_count | Total number of times connections have had to be timed out. |
failed_connections | Number of failed connection attempts this try. Resets after the timeout or successful connection |
max_connection_failures | Max number of consecutive failures before a timeout (here and not a define so it can be vv'ed mid round if needed) |
processing_queries | Queries being checked for timeouts. |
queries_active | Queries currently being handled by database driver |
queries_active_num | Number of active queries, reset to 0 when logged in SStime_track. Used by SStime_track |
queries_standby | Queries pending execution, mapped to complete arguments |
queries_standby_num | Number of standby queries, reset to 0 when logged in SStime_track. Used by SStime_track |
shutting_down | We are in the process of shutting down and should not allow more DB connections |
Procs | |
FireAndForget | Creates and executes a query without waiting for or tracking the results. Query is executed asynchronously (without blocking) and deleted afterwards - any results or errors are discarded. |
QuerySelect | |
create_active_query | Helper proc for handling activating queued queries |
reset_tracking | Resets the tracking numbers on the subsystem. Used by SStime_track. |
Var Details
all_queries
All the current queries that exist.
all_queries_num
Number of all queries, reset to 0 when logged in SStime_track. Used by SStime_track
failed_connection_timeout
world.time that connection attempts can resume
failed_connection_timeout_count
Total number of times connections have had to be timed out.
failed_connections
Number of failed connection attempts this try. Resets after the timeout or successful connection
max_connection_failures
Max number of consecutive failures before a timeout (here and not a define so it can be vv'ed mid round if needed)
processing_queries
Queries being checked for timeouts.
queries_active
Queries currently being handled by database driver
queries_active_num
Number of active queries, reset to 0 when logged in SStime_track. Used by SStime_track
queries_standby
Queries pending execution, mapped to complete arguments
queries_standby_num
Number of standby queries, reset to 0 when logged in SStime_track. Used by SStime_track
shutting_down
We are in the process of shutting down and should not allow more DB connections
Proc Details
FireAndForget
Creates and executes a query without waiting for or tracking the results. Query is executed asynchronously (without blocking) and deleted afterwards - any results or errors are discarded.
Arguments:
- sql_query - The SQL query string to execute
- arguments - List of arguments to pass to the query for parameter binding
- allow_during_shutdown - If TRUE, allows query to be created during subsystem shutdown. Generally, only cleanup queries should set this.
QuerySelect
- QuerySelect
Run a list of query datums in parallel, blocking until they all complete.
- queries - List of queries or single query datum to run.
- warn - Controls rather warn_execute() or Execute() is called.
- qdel - If you don't care about the result or checking for errors, you can have the queries be deleted afterwards. This can be combined with invoke_async as a way of running queries async without having to care about waiting for them to finish so they can be deleted, however you should probably just use FireAndForget instead if it's just a single query.
create_active_query
Helper proc for handling activating queued queries
reset_tracking
Resets the tracking numbers on the subsystem. Used by SStime_track.