libasynql
3.2.0
Asynchronous MySQL access library for PocketMine plugins.
|
Public Member Functions | |
__construct (string $name, string $type, ?string $default) | |
unlist () | |
getName () | |
isList () | |
canBeEmpty () | |
isNullable () | |
getType () | |
getDefault () | |
isOptional () | |
equals (GenericVariable $that, &$diff=null) | |
jsonSerialize () | |
Data Fields | |
const | TYPE_STRING = "string" |
const | TYPE_INT = "int" |
const | TYPE_FLOAT = "float" |
const | TYPE_BOOL = "bool" |
const | TYPE_TIMESTAMP = "timestamp" |
const | TIME_0 = "0" |
const | TIME_NOW = "NOW" |
Protected Attributes | |
$name | |
$list = false | |
$canEmpty = false | |
$nullable = false | |
$type | |
$default = null | |
Represents a variable that can be passed into GenericStatement::format()
Definition at line 41 of file GenericVariable.php.
__construct | ( | string | $name, |
string | $type, | ||
?string | $default | ||
) |
CallableParameterUseCaseInTypeContextInspection
CallableParameterUseCaseInTypeContextInspection
Definition at line 59 of file GenericVariable.php.
canBeEmpty | ( | ) |
Returns whether the list variable is declared with list?
rather than list:
.
If the SQL dialect does not support empty list declarations ()
, and list:
is used, an exception will be thrown when an empty array is passed as the value. If list?
is used, a randomly-generated string will be filled into the array to satisfy the language's requirements. This might cause undesired behaviour unless you are only using this variable for a simple IN :list
condition.
As this may expose a security breach or a performance degrade, plugins are not encouraged to use this method. Instead it is more desirable to check if the array is empty before passing the value into libasynql.
Definition at line 144 of file GenericVariable.php.
equals | ( | GenericVariable | $that, |
& | $diff = null |
||
) |
Definition at line 171 of file GenericVariable.php.
getDefault | ( | ) |
Definition at line 163 of file GenericVariable.php.
getName | ( | ) |
Definition at line 127 of file GenericVariable.php.
getType | ( | ) |
Definition at line 156 of file GenericVariable.php.
isList | ( | ) |
Definition at line 131 of file GenericVariable.php.
isNullable | ( | ) |
Definition at line 152 of file GenericVariable.php.
isOptional | ( | ) |
Definition at line 167 of file GenericVariable.php.
jsonSerialize | ( | ) |
Definition at line 195 of file GenericVariable.php.
unlist | ( | ) |
Definition at line 118 of file GenericVariable.php.
|
protected |
Definition at line 53 of file GenericVariable.php.
|
protected |
Definition at line 57 of file GenericVariable.php.
|
protected |
Definition at line 52 of file GenericVariable.php.
|
protected |
Definition at line 51 of file GenericVariable.php.
|
protected |
Definition at line 54 of file GenericVariable.php.
|
protected |
Definition at line 55 of file GenericVariable.php.
const TIME_0 = "0" |
Definition at line 48 of file GenericVariable.php.
const TIME_NOW = "NOW" |
Definition at line 49 of file GenericVariable.php.
const TYPE_BOOL = "bool" |
Definition at line 45 of file GenericVariable.php.
const TYPE_FLOAT = "float" |
Definition at line 44 of file GenericVariable.php.
const TYPE_INT = "int" |
Definition at line 43 of file GenericVariable.php.
const TYPE_STRING = "string" |
Definition at line 42 of file GenericVariable.php.
const TYPE_TIMESTAMP = "timestamp" |
Definition at line 46 of file GenericVariable.php.