libasynql  3.2.0
Asynchronous MySQL access library for PocketMine plugins.
GenericStatementImpl Class Reference
Inheritance diagram for GenericStatementImpl:
GenericStatement MysqlStatementImpl SqliteStatementImpl

Public Member Functions

 getName ()
 
 getQuery ()
 
 getDoc ()
 
 getVariables ()
 
 getFile ()
 
 getLineNumber ()
 
 __construct (string $name, string $query, string $doc, array $variables, ?string $file, int $lineNo)
 
 format (array $vars, ?string $placeHolder, ?array &$outArgs)
 
 jsonSerialize ()
 
- Public Member Functions inherited from GenericStatement
 getDialect ()
 

Static Public Member Functions

static forDialect (string $dialect, string $name, string $query, string $doc, array $variables, ?string $file, int $lineNo)
 

Protected Member Functions

 compilePositions ()
 
 formatVariable (GenericVariable $variable, $value, ?string $placeHolder, array &$outArgs)
 

Protected Attributes

 $name
 
 $query
 
 $doc
 
 $variables
 
 $file
 
 $lineNo
 
 $varPositions = []
 

Detailed Description

Definition at line 41 of file GenericStatementImpl.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $name,
string  $query,
string  $doc,
array  $variables,
?string  $file,
int  $lineNo 
)

Definition at line 101 of file GenericStatementImpl.php.

Member Function Documentation

◆ compilePositions()

compilePositions ( )
protected

Definition at line 112 of file GenericStatementImpl.php.

◆ forDialect()

static forDialect ( string  $dialect,
string  $name,
string  $query,
string  $doc,
array  $variables,
?string  $file,
int  $lineNo 
)
static
Parameters
string$dialect
string$name
string$query
string$doc
GenericVariable[]$variables
string | null$file
int$lineNo
Returns
GenericStatementImpl

Definition at line 92 of file GenericStatementImpl.php.

◆ format()

format ( array  $vars,
?string  $placeHolder,
?array &  $outArgs 
)

Creates a query based on the args and the backend

Parameters
mixed[]$vars the input arguments
string | null$placeHolderthe backend-dependent variable placeholder constant, if any
mixed[]&$outArgs will be filled with the variables to be passed to the backend
Returns
string

Implements GenericStatement.

Definition at line 176 of file GenericStatementImpl.php.

◆ formatVariable()

formatVariable ( GenericVariable  $variable,
  $value,
?string  $placeHolder,
array &  $outArgs 
)
abstractprotected

◆ getDoc()

getDoc ( )

Implements GenericStatement.

Definition at line 66 of file GenericStatementImpl.php.

◆ getFile()

getFile ( )

Implements GenericStatement.

Definition at line 74 of file GenericStatementImpl.php.

◆ getLineNumber()

getLineNumber ( )

Implements GenericStatement.

Definition at line 78 of file GenericStatementImpl.php.

◆ getName()

getName ( )

Returns the identifier name of this query

Returns
string

Implements GenericStatement.

Definition at line 58 of file GenericStatementImpl.php.

◆ getQuery()

getQuery ( )

Implements GenericStatement.

Definition at line 62 of file GenericStatementImpl.php.

◆ getVariables()

getVariables ( )

Returns the variables required by this statement

Returns
GenericVariable[]

Implements GenericStatement.

Definition at line 70 of file GenericStatementImpl.php.

◆ jsonSerialize()

jsonSerialize ( )

Definition at line 208 of file GenericStatementImpl.php.

Field Documentation

◆ $doc

$doc
protected

Definition at line 47 of file GenericStatementImpl.php.

◆ $file

$file
protected

Definition at line 51 of file GenericStatementImpl.php.

◆ $lineNo

$lineNo
protected

Definition at line 53 of file GenericStatementImpl.php.

◆ $name

$name
protected

Definition at line 43 of file GenericStatementImpl.php.

◆ $query

$query
protected

Definition at line 45 of file GenericStatementImpl.php.

◆ $variables

$variables
protected

Definition at line 49 of file GenericStatementImpl.php.

◆ $varPositions

$varPositions = []
protected

Definition at line 56 of file GenericStatementImpl.php.


The documentation for this class was generated from the following file: