Zum Hauptinhalt springen

Zymba Documentation

SQL.Connection

object @SQL.Connection(@Base) {
begin(): $this {}
close() {}
commit(): $this {}
countAffectedRows(): int {}
countRowsInTable(string $table): int {}
delete(string $table, object $conditions): int {}
exists(string $table, object $conditions): bool {}
exit() {}
fetchAll(string $query, bool $indexed): object {}
fetchAllOfField(string $query, int $index): object {}
fetchOne(string $query, bool $indexed): object {}
getCharset(): string {}
getDatabaseName(): string {}
getDatabaseSize(): int {}
getLastInsertID(): int {}
getVersion(): string {}
insert(string $table, object $data): int {}
listFieldsInTable(string $table): object {}
listTables(): object {}
query(string $query): object {}
releaseSavepoint(string $name): $this {}
rollback(): $this {}
rollbackToSavepoint(string $name): $this {}
savepoint(string $name): $this {}
selectAll(string $table, object $fields, object $conditions, object $orderby, int $limit, int $offset, bool $indexed): object {}
selectAllOfField(string $table, string $field, object $conditions, object $orderby, int $limit, int $offset): object {}
selectOne(string $table, object $fields, object $conditions, object $orderby, bool $indexed): object {}
selectSavepoint(string $name): object {}
selectTransaction(): object {}
setCharset(string $charset): $this {}
update(string $table, object $data, object $conditions): int {}
updateOrInsert(string $table, object $data, object $conditions): int {}
}

Abstract SQL connection prototype.

Prototype

Base

Methods

$this.begin(): this
Returns
TypeValue
$this

Closes this connection and frees its associated resources.

$this.close(): void
$this.commit(): this
Returns
TypeValue
$this
$this.countAffectedRows(): int
Returns
TypeValue
int
$this.countRowsInTable(string $table): int
Parameters
NameTypeValueDefault
tablestring""
Returns
TypeValue
int
$this.delete(string $table, object $conditions): int
Parameters
NameTypeValueDefault
tablestring""
conditionsobject[field: value, ...][]
Returns
TypeValue
int
$this.exists(string $table, object $conditions): bool
Parameters
NameTypeValueDefault
tablestring""
conditionsobject[field: value, ...][]
Returns
TypeValue
bool

Closes this connection and frees its associated resources for the purpose of contextualization.

$this.exit(): void
$this.fetchAll(string $query, bool $indexed): object
Parameters
NameTypeValueDefault
querystring""
indexedboolfalse
Returns
TypeValue
object[row, ...]
$this.fetchAllOfField(string $query, int $index): object
Parameters
NameTypeValueDefault
querystring""
indexint0
Returns
TypeValue
object[value, ...]
$this.fetchOne(string $query, bool $indexed): object
Parameters
NameTypeValueDefault
querystring""
indexedboolfalse
Returns
TypeValue
object[field: value, ...]
null
$this.getCharset(): string
Returns
TypeValue
string
$this.getDatabaseName(): string
Returns
TypeValue
string
$this.getDatabaseSize(): int
Returns
TypeValue
int
$this.getLastInsertID(): int
Returns
TypeValue
int
$this.getVersion(): string
Returns
TypeValue
string
$this.insert(string $table, object $data): int
Parameters
NameTypeValueDefault
tablestring""
dataobject[field: value, ...][]
Returns
TypeValue
int
$this.listFieldsInTable(string $table): object
Parameters
NameTypeValueDefault
tablestring""
Returns
TypeValue
object[field, ...]
$this.listTables(): object
Returns
TypeValue
object[table, ...]
$this.query(string $query): object
Parameters
NameTypeValueDefault
querystring""
Returns
TypeValue
objectSQL.ResultSet
null
$this.releaseSavepoint(string $name): this
Parameters
NameTypeValueDefault
namestring""
Returns
TypeValue
$this
$this.rollback(): this
Returns
TypeValue
$this
$this.rollbackToSavepoint(string $name): this
Parameters
NameTypeValueDefault
namestring""
Returns
TypeValue
$this
$this.savepoint(string $name): this
Parameters
NameTypeValueDefault
namestring""
Returns
TypeValue
$this
$this.selectAll(string $table, object $fields, object $conditions, object $orderby, int $limit, int $offset, bool $indexed): object
Parameters
NameTypeValueDefault
tablestring""
fieldsobject[field, ...][]
conditionsobject[field: value, ...][]
orderbyobject[field: descending, ...][]
limitint0
offsetint0
indexedboolfalse
Returns
TypeValue
object[row, ...]
$this.selectAllOfField(string $table, string $field, object $conditions, object $orderby, int $limit, int $offset): object
Parameters
NameTypeValueDefault
tablestring""
fieldstring""
conditionsobject[field: value, ...][]
orderbyobject[field: descending, ...][]
limitint0
offsetint0
Returns
TypeValue
object[value, ...]
$this.selectOne(string $table, object $fields, object $conditions, object $orderby, bool $indexed): object
Parameters
NameTypeValueDefault
tablestring""
fieldsobject[field, ...][]
conditionsobject[field: value, ...][]
orderbyobject[field: descending, ...][]
indexedboolfalse
Returns
TypeValue
object[field: value, ...]
null
$this.selectSavepoint(string $name): @SQL.SavepointContext
Parameters
NameTypeValueDefault
namestring""
Returns
TypeValue
@SQL.SavepointContext
$this.selectTransaction(): @SQL.TransactionContext
Returns
TypeValue
@SQL.TransactionContext
$this.setCharset(string $charset): this
Parameters
NameTypeValueDefault
charsetstring""
Returns
TypeValue
$this
$this.update(string $table, object $data, object $conditions): int
Parameters
NameTypeValueDefault
tablestring""
dataobject[field: value, ...][]
conditionsobject[field: value, ...][]
Returns
TypeValue
int
$this.updateOrInsert(string $table, object $data, object $conditions): int
Parameters
NameTypeValueDefault
tablestring""
dataobject[field: value, ...][]
conditionsobject[field: value, ...][]
Returns
TypeValue
int