Zymba Documentation
SQL.Connection
Text
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
Methods
Closes this connection and frees its associated resources.
CODE
$this.close(): void
Closes this connection and frees its associated resources for the purpose of contextualization.
CODE
$this.exit(): void
CODE
$this.selectAll(string $table, object $fields, object $conditions, object $orderby, int $limit, int $offset, bool $indexed): object
Parameters
| Name | Type | Value | Default |
|---|---|---|---|
| table | string | "" | |
| fields | object | [field, ...] | [] |
| conditions | object | [field: value, ...] | [] |
| orderby | object | [field: descending, ...] | [] |
| limit | int | 0 | |
| offset | int | 0 | |
| indexed | bool | false |
Returns
| Type | Value |
|---|---|
object | [row, ...] |
CODE
$this.selectAllOfField(string $table, string $field, object $conditions, object $orderby, int $limit, int $offset): object
Parameters
| Name | Type | Value | Default |
|---|---|---|---|
| table | string | "" | |
| field | string | "" | |
| conditions | object | [field: value, ...] | [] |
| orderby | object | [field: descending, ...] | [] |
| limit | int | 0 | |
| offset | int | 0 |
Returns
| Type | Value |
|---|---|
object | [value, ...] |
CODE
$this.selectOne(string $table, object $fields, object $conditions, object $orderby, bool $indexed): object
Parameters
| Name | Type | Value | Default |
|---|---|---|---|
| table | string | "" | |
| fields | object | [field, ...] | [] |
| conditions | object | [field: value, ...] | [] |
| orderby | object | [field: descending, ...] | [] |
| indexed | bool | false |
Returns
| Type | Value |
|---|---|
object | [field: value, ...] |
null |