October\Rain\Database\Connections\Connection

Overview

Connection base class

Extends
  • Illuminate\Database\Connection
Implements
  • Illuminate\Database\ConnectionInterface

Protected Properties

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties

  • $pdo - The active PDO connection. (defined in Illuminate\Database\Connection)
  • $readPdo - The active PDO connection used for reads. (defined in Illuminate\Database\Connection)
  • $database - The name of the connected database. (defined in Illuminate\Database\Connection)
  • $readWriteType - The type of the connection. (defined in Illuminate\Database\Connection)
  • $tablePrefix - The table prefix for the connection. (defined in Illuminate\Database\Connection)
  • $config - The database connection configuration options. (defined in Illuminate\Database\Connection)
  • $reconnector - The reconnector instance for the connection. (defined in Illuminate\Database\Connection)
  • $queryGrammar - The query grammar implementation. (defined in Illuminate\Database\Connection)
  • $schemaGrammar - The schema grammar implementation. (defined in Illuminate\Database\Connection)
  • $postProcessor - The query post processor implementation. (defined in Illuminate\Database\Connection)
  • $events - The event dispatcher instance. (defined in Illuminate\Database\Connection)
  • $fetchMode - The default fetch mode of the connection. (defined in Illuminate\Database\Connection)
  • $transactions - The number of active transactions. (defined in Illuminate\Database\Connection)
  • $transactionsManager - The transaction manager instance. (defined in Illuminate\Database\Connection)
  • $recordsModified - Indicates if changes have been made to the database. (defined in Illuminate\Database\Connection)
  • $readOnWriteConnection - Indicates if the connection should use the "write" PDO connection. (defined in Illuminate\Database\Connection)
  • $queryLog - All of the queries run against the connection. (defined in Illuminate\Database\Connection)
  • $loggingQueries - Indicates whether queries are being logged. (defined in Illuminate\Database\Connection)
  • $totalQueryDuration - The duration of all executed queries in milliseconds. (defined in Illuminate\Database\Connection)
  • $queryDurationHandlers - All of the registered query duration handlers. (defined in Illuminate\Database\Connection)
  • $pretending - Indicates if the connection is in a "dry run". (defined in Illuminate\Database\Connection)
  • $beforeExecutingCallbacks - All of the callbacks that should be invoked before a query is executed. (defined in Illuminate\Database\Connection)
  • $doctrineConnection - The instance of Doctrine connection. (defined in Illuminate\Database\Connection)
  • $doctrineTypeMappings - Type mappings that should be registered with new Doctrine connections. (defined in Illuminate\Database\Connection)
  • $resolvers - The connection resolvers. (defined in Illuminate\Database\Connection)
  • $macros - The registered string macros. (defined in Illuminate\Database\Connection)

Public Methods

public logQuery()

public logQuery(
    string $query,
    array $bindings,
    float|null $time = null
): void 

logQuery in the connection's query log

public query()

public query(): October\Rain\Database\QueryBuilder 

query builder instance

Show inherited public methods

Inherited Public Methods

  • __call() - Dynamically handle calls to the class. (defined in Illuminate\Database\Connection)
  • __callStatic() - Dynamically handle calls to the class. (defined in Illuminate\Database\Connection)
  • __construct() - Create a new database connection instance. (defined in Illuminate\Database\Connection)
  • affectingStatement() - Run an SQL statement and get the number of rows affected. (defined in Illuminate\Database\Connection)
  • afterCommit() - Execute the callback after a transaction commits. (defined in Illuminate\Database\Connection)
  • allowQueryDurationHandlersToRunAgain() - Allow all the query duration handlers to run again, even if they have already run. (defined in Illuminate\Database\Connection)
  • beforeExecuting() - Register a hook to be run just before a database query is executed. (defined in Illuminate\Database\Connection)
  • beginTransaction() - Start a new database transaction. (defined in Illuminate\Database\Connection)
  • bindValues() - Bind values to their parameters in the given statement. (defined in Illuminate\Database\Connection)
  • commit() - Commit the active database transaction. (defined in Illuminate\Database\Connection)
  • cursor() - Run a select statement against the database and returns a generator. (defined in Illuminate\Database\Connection)
  • delete() - Run a delete statement against the database. (defined in Illuminate\Database\Connection)
  • disableQueryLog() - Disable the query log on the connection. (defined in Illuminate\Database\Connection)
  • disconnect() - Disconnect from the underlying PDO connection. (defined in Illuminate\Database\Connection)
  • enableQueryLog() - Enable the query log on the connection. (defined in Illuminate\Database\Connection)
  • flushMacros() - Flush the existing macros. (defined in Illuminate\Database\Connection)
  • flushQueryLog() - Clear the query log. (defined in Illuminate\Database\Connection)
  • forgetRecordModificationState() - Reset the record modification state. (defined in Illuminate\Database\Connection)
  • getConfig() - Get an option from the configuration options. (defined in Illuminate\Database\Connection)
  • getDatabaseName() - Get the name of the connected database. (defined in Illuminate\Database\Connection)
  • getDoctrineColumn() - Get a Doctrine Schema Column instance. (defined in Illuminate\Database\Connection)
  • getDoctrineConnection() - Get the Doctrine DBAL database connection instance. (defined in Illuminate\Database\Connection)
  • getDoctrineSchemaManager() - Get the Doctrine DBAL schema manager for the connection. (defined in Illuminate\Database\Connection)
  • getDriverName() - Get the PDO driver name. (defined in Illuminate\Database\Connection)
  • getEventDispatcher() - Get the event dispatcher used by the connection. (defined in Illuminate\Database\Connection)
  • getName() - Get the database connection name. (defined in Illuminate\Database\Connection)
  • getNameWithReadWriteType() - Get the database connection full name. (defined in Illuminate\Database\Connection)
  • getPdo() - Get the current PDO connection. (defined in Illuminate\Database\Connection)
  • getPostProcessor() - Get the query post processor used by the connection. (defined in Illuminate\Database\Connection)
  • getQueryGrammar() - Get the query grammar used by the connection. (defined in Illuminate\Database\Connection)
  • getQueryLog() - Get the connection query log. (defined in Illuminate\Database\Connection)
  • getRawPdo() - Get the current PDO connection parameter without executing any reconnect logic. (defined in Illuminate\Database\Connection)
  • getRawReadPdo() - Get the current read PDO connection parameter without executing any reconnect logic. (defined in Illuminate\Database\Connection)
  • getReadPdo() - Get the current PDO connection used for reading. (defined in Illuminate\Database\Connection)
  • getResolver() - Get the connection resolver for the given driver. (defined in Illuminate\Database\Connection)
  • getSchemaBuilder() - Get a schema builder instance for the connection. (defined in Illuminate\Database\Connection)
  • getSchemaGrammar() - Get the schema grammar used by the connection. (defined in Illuminate\Database\Connection)
  • getTablePrefix() - Get the table prefix for the connection. (defined in Illuminate\Database\Connection)
  • hasMacro() - Checks if macro is registered. (defined in Illuminate\Database\Connection)
  • hasModifiedRecords() - Determine if the database connection has modified any database records. (defined in Illuminate\Database\Connection)
  • insert() - Run an insert statement against the database. (defined in Illuminate\Database\Connection)
  • isDoctrineAvailable() - Is Doctrine available? (defined in Illuminate\Database\Connection)
  • listen() - Register a database query listener with the connection. (defined in Illuminate\Database\Connection)
  • logging() - Determine whether we're logging queries. (defined in Illuminate\Database\Connection)
  • macro() - Register a custom macro. (defined in Illuminate\Database\Connection)
  • mixin() - Mix another object into the class. (defined in Illuminate\Database\Connection)
  • prepareBindings() - Prepare the query bindings for execution. (defined in Illuminate\Database\Connection)
  • pretend() - Execute the given callback in "dry run" mode. (defined in Illuminate\Database\Connection)
  • pretending() - Determine if the connection is in a "dry run". (defined in Illuminate\Database\Connection)
  • raw() - Get a new raw query expression. (defined in Illuminate\Database\Connection)
  • reconnect() - Reconnect to the database. (defined in Illuminate\Database\Connection)
  • recordsHaveBeenModified() - Indicate if any records have been modified. (defined in Illuminate\Database\Connection)
  • registerDoctrineType() - Register a custom Doctrine mapping type. (defined in Illuminate\Database\Connection)
  • resetTotalQueryDuration() - Reset the duration of all run queries. (defined in Illuminate\Database\Connection)
  • resolverFor() - Register a connection resolver. (defined in Illuminate\Database\Connection)
  • rollBack() - Rollback the active database transaction. (defined in Illuminate\Database\Connection)
  • scalar() - Run a select statement and return the first column of the first row. (defined in Illuminate\Database\Connection)
  • select() - Run a select statement against the database. (defined in Illuminate\Database\Connection)
  • selectFromWriteConnection() - Run a select statement against the database. (defined in Illuminate\Database\Connection)
  • selectOne() - Run a select statement and return a single result. (defined in Illuminate\Database\Connection)
  • setDatabaseName() - Set the name of the connected database. (defined in Illuminate\Database\Connection)
  • setEventDispatcher() - Set the event dispatcher instance on the connection. (defined in Illuminate\Database\Connection)
  • setPdo() - Set the PDO connection. (defined in Illuminate\Database\Connection)
  • setPostProcessor() - Set the query post processor used by the connection. (defined in Illuminate\Database\Connection)
  • setQueryGrammar() - Set the query grammar used by the connection. (defined in Illuminate\Database\Connection)
  • setReadPdo() - Set the PDO connection used for reading. (defined in Illuminate\Database\Connection)
  • setReadWriteType() - Set the read / write type of the connection. (defined in Illuminate\Database\Connection)
  • setReconnector() - Set the reconnect instance on the connection. (defined in Illuminate\Database\Connection)
  • setRecordModificationState() - Set the record modification state. (defined in Illuminate\Database\Connection)
  • setSchemaGrammar() - Set the schema grammar used by the connection. (defined in Illuminate\Database\Connection)
  • setTablePrefix() - Set the table prefix in use by the connection. (defined in Illuminate\Database\Connection)
  • setTransactionManager() - Set the transaction manager instance on the connection. (defined in Illuminate\Database\Connection)
  • statement() - Execute an SQL statement and return the boolean result. (defined in Illuminate\Database\Connection)
  • table() - Begin a fluent query against a database table. (defined in Illuminate\Database\Connection)
  • totalQueryDuration() - Get the duration of all run queries in milliseconds. (defined in Illuminate\Database\Connection)
  • transaction() - Execute a Closure within a transaction. (defined in Illuminate\Database\Connection)
  • transactionLevel() - Get the number of active transactions. (defined in Illuminate\Database\Connection)
  • unprepared() - Run a raw, unprepared query against the PDO connection. (defined in Illuminate\Database\Connection)
  • unsetEventDispatcher() - Unset the event dispatcher for this connection. (defined in Illuminate\Database\Connection)
  • unsetTransactionManager() - Unset the transaction manager for this connection. (defined in Illuminate\Database\Connection)
  • update() - Run an update statement against the database. (defined in Illuminate\Database\Connection)
  • useDefaultPostProcessor() - Set the query post processor to the default implementation. (defined in Illuminate\Database\Connection)
  • useDefaultQueryGrammar() - Set the query grammar to the default implementation. (defined in Illuminate\Database\Connection)
  • useDefaultSchemaGrammar() - Set the schema grammar to the default implementation. (defined in Illuminate\Database\Connection)
  • useWriteConnectionWhenReading() - Indicate that the connection should use the write PDO connection for reads. (defined in Illuminate\Database\Connection)
  • usingNativeSchemaOperations() - Indicates whether native alter operations will be used when dropping or renaming columns, even if Doctrine DBAL is installed. (defined in Illuminate\Database\Connection)
  • whenQueryingForLongerThan() - Register a callback to be invoked when the connection queries for longer than a given amount of time. (defined in Illuminate\Database\Connection)
  • withTablePrefix() - Set the table prefix and return the grammar. (defined in Illuminate\Database\Connection)

Protected Methods

protected fireConnectionEvent()

protected fireConnectionEvent(string $event): void 

fireConnectionEvent for this connection

Show inherited protected methods

Inherited Protected Methods

  • afterCommitCallbacksShouldBeExecuted() - Determine if after commit callbacks should be executed. (defined in Illuminate\Database\Connection)
  • availableAt() - Get the "available at" UNIX timestamp. (defined in Illuminate\Database\Connection)
  • causedByConcurrencyError() - Determine if the given exception was caused by a concurrency error such as a deadlock or serialization failure. (defined in Illuminate\Database\Connection)
  • causedByLostConnection() - Determine if the given exception was caused by a lost connection. (defined in Illuminate\Database\Connection)
  • createSavepoint() - Create a save point within the database. (defined in Illuminate\Database\Connection)
  • createTransaction() - Create a transaction within the database. (defined in Illuminate\Database\Connection)
  • currentTime() - Get the current system time as a UNIX timestamp. (defined in Illuminate\Database\Connection)
  • event() - Fire the given event if possible. (defined in Illuminate\Database\Connection)
  • getDefaultPostProcessor() - Get the default post processor instance. (defined in Illuminate\Database\Connection)
  • getDefaultQueryGrammar() - Get the default query grammar instance. (defined in Illuminate\Database\Connection)
  • getDefaultSchemaGrammar() - Get the default schema grammar instance. (defined in Illuminate\Database\Connection)
  • getElapsedTime() - Get the elapsed time since a given starting point. (defined in Illuminate\Database\Connection)
  • getPdoForSelect() - Get the PDO connection to use for a select query. (defined in Illuminate\Database\Connection)
  • handleBeginTransactionException() - Handle an exception from a transaction beginning. (defined in Illuminate\Database\Connection)
  • handleCommitTransactionException() - Handle an exception encountered when committing a transaction. (defined in Illuminate\Database\Connection)
  • handleQueryException() - Handle a query exception. (defined in Illuminate\Database\Connection)
  • handleRollBackException() - Handle an exception from a rollback. (defined in Illuminate\Database\Connection)
  • handleTransactionException() - Handle an exception encountered when running a transacted statement. (defined in Illuminate\Database\Connection)
  • parseDateInterval() - If the given value is an interval, convert it to a DateTime instance. (defined in Illuminate\Database\Connection)
  • performRollBack() - Perform a rollback within the database. (defined in Illuminate\Database\Connection)
  • prepared() - Configure the PDO prepared statement. (defined in Illuminate\Database\Connection)
  • reconnectIfMissingConnection() - Reconnect to the database if a PDO connection is missing. (defined in Illuminate\Database\Connection)
  • run() - Run a SQL statement and log its execution context. (defined in Illuminate\Database\Connection)
  • runQueryCallback() - Run a SQL statement. (defined in Illuminate\Database\Connection)
  • secondsUntil() - Get the number of seconds until the given DateTime. (defined in Illuminate\Database\Connection)
  • tryAgainIfCausedByLostConnection() - Handle a query exception that occurred during query execution. (defined in Illuminate\Database\Connection)
  • withFreshQueryLog() - Execute the given callback in "dry run" mode. (defined in Illuminate\Database\Connection)