| Server IP : 172.67.179.166 / Your IP : 172.71.24.3 Web Server : nginx/1.20.2 System : Linux 172-104-110-161.ip.linodeusercontent.com 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : www ( 1000) PHP Version : 8.1.9 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/data.driver-hp.download/framework-4.1.3/system/Database/ |
Upload File : |
<?php
/**
* This file is part of the CodeIgniter 4 framework.
*
* (c) CodeIgniter Foundation <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CodeIgniter\Database;
/**
* Interface ConnectionInterface
*/
interface ConnectionInterface
{
/**
* Initializes the database connection/settings.
*
* @return mixed
*/
public function initialize();
//--------------------------------------------------------------------
/**
* Connect to the database.
*
* @param boolean $persistent
* @return mixed
*/
public function connect(bool $persistent = false);
//--------------------------------------------------------------------
/**
* Create a persistent database connection.
*
* @return mixed
*/
public function persistentConnect();
//--------------------------------------------------------------------
/**
* Keep or establish the connection if no queries have been sent for
* a length of time exceeding the server's idle timeout.
*
* @return mixed
*/
public function reconnect();
//--------------------------------------------------------------------
/**
* Returns the actual connection object. If both a 'read' and 'write'
* connection has been specified, you can pass either term in to
* get that connection. If you pass either alias in and only a single
* connection is present, it must return the sole connection.
*
* @param string|null $alias
*
* @return mixed
*/
public function getConnection(string $alias = null);
//--------------------------------------------------------------------
/**
* Select a specific database table to use.
*
* @param string $databaseName
*
* @return mixed
*/
public function setDatabase(string $databaseName);
//--------------------------------------------------------------------
/**
* Returns the name of the current database being used.
*
* @return string
*/
public function getDatabase(): string;
//--------------------------------------------------------------------
/**
* Returns the last error encountered by this connection.
* Must return this format: ['code' => string|int, 'message' => string]
* intval(code) === 0 means "no error".
*
* @return array<string,string|int>
*/
public function error(): array;
//--------------------------------------------------------------------
/**
* The name of the platform in use (MySQLi, mssql, etc)
*
* @return string
*/
public function getPlatform(): string;
//--------------------------------------------------------------------
/**
* Returns a string containing the version of the database being used.
*
* @return string
*/
public function getVersion(): string;
//--------------------------------------------------------------------
/**
* Orchestrates a query against the database. Queries must use
* Database\Statement objects to store the query and build it.
* This method works with the cache.
*
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param string $sql
* @param mixed ...$binds
*
* @return BaseResult|Query|boolean
*/
public function query(string $sql, $binds = null);
//--------------------------------------------------------------------
/**
* Performs a basic query against the database. No binding or caching
* is performed, nor are transactions handled. Simply takes a raw
* query string and returns the database-specific result id.
*
* @param string $sql
*
* @return mixed
*/
public function simpleQuery(string $sql);
//--------------------------------------------------------------------
/**
* Returns an instance of the query builder for this connection.
*
* @param string|array $tableName Table name.
*
* @return BaseBuilder Builder.
*/
public function table($tableName);
//--------------------------------------------------------------------
/**
* Returns the last query's statement object.
*
* @return mixed
*/
public function getLastQuery();
//--------------------------------------------------------------------
/**
* "Smart" Escaping
*
* Escapes data based on type.
* Sets boolean and null types.
*
* @param mixed $str
*
* @return mixed
*/
public function escape($str);
//--------------------------------------------------------------------
/**
* Allows for custom calls to the database engine that are not
* supported through our database layer.
*
* @param string $functionName
* @param array ...$params
*
* @return mixed
*/
public function callFunction(string $functionName, ...$params);
//--------------------------------------------------------------------
/**
* Determines if the statement is a write-type query or not.
*
* @param string $sql
* @return boolean
*/
public function isWriteType($sql): bool;
}