Property | Type | Description | |
---|---|---|---|
$conn | |||
$dbname | |||
$delimiter | |||
$host | |||
$ignoreErrors | |||
$isOpen | |||
$password | |||
$username |
Method | Description | |
---|---|---|
addIdentifierQuotes ( $s ) | ||
batchQueryFromFile ( $fullSource ) : boolean | Roughly parse a .sql file and execute it in small batches | |
close ( ) : boolean | ||
fieldExists ( $table, $fieldName ) : bool: | Determines whether a field exists in a table. | |
fieldInfo ( $table, $fieldName ) : boolean | object: | ||
freeResult ( $res ) | ||
getAffectedRows ( ) : integer | ||
getDBname ( ) : string: | ||
getInsertId ( ) : integer | ||
getNumRows ( $res ) : integer | ||
getOne ( $sql ) : mixed | false | ||
getQueryLog ( ) | ||
getRow ( $sql ) : obj | false | ||
getRows ( $sql ) : array | ||
ignoreErrors ( $setting ) | ||
lastErrMsg ( ) | ||
lastErrNo ( ) | ||
newFromContext ( TestSwarmContext $context ) | Creates a Database object, opens the connection and returns the instance. | |
open ( ) | ||
query ( $sql ) : resource | false | Queries other than SELECT, such as DELETE, UPDATE and INSERT. | |
strEncode ( $str ) | ||
tableExists ( $table ) : boolean |
Method | Description | |
---|---|---|
checkEnvironment ( ) | ||
closeConn ( ) : boolean | ||
doQuery ( $sql ) : MySQL | Execute actual queries. Within this class, this function should be used to do queries, not the wrapper function query(). The logger will log the caller of the caller of this function. So there should be one function in between this and outside this class. | |
fetchObject ( $res ) | ||
getContext ( ) | ||
logQuery ( $sql, $queryResponse, $microtimeStart ) : boolean |
Method | Description | |
---|---|---|
__construct ( ) |
public batchQueryFromFile ( $fullSource ) : boolean | ||
$fullSource | string: Full source of .sql file There should be no more than 1 statement (ending in ;) on a single line. | |
return | boolean |
protected doQuery ( $sql ) : MySQL | ||
return | MySQL | resource|false |
public fieldExists ( $table, $fieldName ) : bool: | ||
$table | string | |
$fieldName | string | |
return | bool: |
public static newFromContext ( TestSwarmContext $context ) | ||
$context | TestSwarmContext |
public query ( $sql ) : resource | false | ||
return | resource | false |