PHP 클래스 WeDevs\ORM\Eloquent\Database

상속: implements Illuminate\Database\ConnectionInterface
파일 보기 프로젝트 열기: tareq1988/wp-eloquent 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$db
$transactionCount integer Count of active transactions

공개 메소드들

메소드 설명
__construct ( ) [__construct description]
affectingStatement ( string $query, array $bindings = [] ) : integer Run an SQL statement and get the number of rows affected.
beginTransaction ( ) : void Start a new database transaction.
bind_and_run ( string $query, array $bindings = [] ) : array Bind and run the query
commit ( ) : void Commit the active database transaction.
delete ( string $query, array $bindings = [] ) : integer Run a delete statement against the database.
getPdo ( ) : Database Return self as PDO
getPostProcessor ( )
getQueryGrammar ( )
insert ( string $query, array $bindings = [] ) : boolean Run an insert statement against the database.
instance ( ) : Database Initializes the Database class
lastInsertId ( string $args ) : integer Return the last insert id
prepareBindings ( array $bindings ) : array Prepare the query bindings for execution.
pretend ( Closure $callback ) : array Execute the given callback in "dry run" mode.
raw ( mixed $value ) : Illuminate\Database\Query\Expression Get a new raw query expression.
rollBack ( ) : void Rollback the active database transaction.
select ( string $query, array $bindings = [] ) : array Run a select statement against the database.
selectOne ( string $query, array $bindings = [] ) : mixed Run a select statement and return a single result.
statement ( string $query, array $bindings = [] ) : boolean Execute an SQL statement and return the boolean result.
table ( string $table ) : Builder Begin a fluent query against a database table.
transaction ( Closure $callback ) : mixed Execute a Closure within a transaction.
transactionLevel ( ) : integer Get the number of active transactions.
unprepared ( string $query ) : boolean Run a raw, unprepared query against the PDO connection.
update ( string $query, array $bindings = [] ) : integer Run an update statement against the database.

비공개 메소드들

메소드 설명
bind_params ( $query, $bindings, $update = false ) : mixed A hacky way to emulate bind parameters into SQL query

메소드 상세

__construct() 공개 메소드

[__construct description]
public __construct ( )

affectingStatement() 공개 메소드

Run an SQL statement and get the number of rows affected.
public affectingStatement ( string $query, array $bindings = [] ) : integer
$query string
$bindings array
리턴 integer

beginTransaction() 공개 메소드

Start a new database transaction.
public beginTransaction ( ) : void
리턴 void

bind_and_run() 공개 메소드

Bind and run the query
public bind_and_run ( string $query, array $bindings = [] ) : array
$query string
$bindings array
리턴 array

commit() 공개 메소드

Commit the active database transaction.
public commit ( ) : void
리턴 void

delete() 공개 메소드

Run a delete statement against the database.
public delete ( string $query, array $bindings = [] ) : integer
$query string
$bindings array
리턴 integer

getPdo() 공개 메소드

Return self as PDO
public getPdo ( ) : Database
리턴 Database

getPostProcessor() 공개 메소드

public getPostProcessor ( )

getQueryGrammar() 공개 메소드

public getQueryGrammar ( )

insert() 공개 메소드

Run an insert statement against the database.
public insert ( string $query, array $bindings = [] ) : boolean
$query string
$bindings array
리턴 boolean

instance() 공개 정적인 메소드

Initializes the Database class
public static instance ( ) : Database
리턴 Database

lastInsertId() 공개 메소드

Return the last insert id
public lastInsertId ( string $args ) : integer
$args string
리턴 integer

prepareBindings() 공개 메소드

Prepare the query bindings for execution.
public prepareBindings ( array $bindings ) : array
$bindings array
리턴 array

pretend() 공개 메소드

Execute the given callback in "dry run" mode.
public pretend ( Closure $callback ) : array
$callback Closure
리턴 array

raw() 공개 메소드

Get a new raw query expression.
public raw ( mixed $value ) : Illuminate\Database\Query\Expression
$value mixed
리턴 Illuminate\Database\Query\Expression

rollBack() 공개 메소드

Rollback the active database transaction.
public rollBack ( ) : void
리턴 void

select() 공개 메소드

Run a select statement against the database.
public select ( string $query, array $bindings = [] ) : array
$query string
$bindings array
리턴 array

selectOne() 공개 메소드

Run a select statement and return a single result.
public selectOne ( string $query, array $bindings = [] ) : mixed
$query string
$bindings array
리턴 mixed

statement() 공개 메소드

Execute an SQL statement and return the boolean result.
public statement ( string $query, array $bindings = [] ) : boolean
$query string
$bindings array
리턴 boolean

table() 공개 메소드

Begin a fluent query against a database table.
public table ( string $table ) : Builder
$table string
리턴 Illuminate\Database\Query\Builder

transaction() 공개 메소드

Execute a Closure within a transaction.
public transaction ( Closure $callback ) : mixed
$callback Closure
리턴 mixed

transactionLevel() 공개 메소드

Get the number of active transactions.
public transactionLevel ( ) : integer
리턴 integer

unprepared() 공개 메소드

Run a raw, unprepared query against the PDO connection.
public unprepared ( string $query ) : boolean
$query string
리턴 boolean

update() 공개 메소드

Run an update statement against the database.
public update ( string $query, array $bindings = [] ) : integer
$query string
$bindings array
리턴 integer

프로퍼티 상세

$db 공개적으로 프로퍼티

public $db

$transactionCount 공개적으로 프로퍼티

Count of active transactions
public int $transactionCount
리턴 integer