Skip to content

Commit b3bc928

Browse files
committed
Readme: updated
1 parent 29b4593 commit b3bc928

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

readme.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,45 @@ COMMENT 'Clients table.'
7070
ENGINE=InnoDB;
7171
```
7272

73+
74+
## Statements
75+
76+
There is few predefined statements:
77+
78+
```php
79+
$sql->createTable($tableName);
80+
$sql->dropTable($tableName);
81+
$sql->renameTable($old, $new);
82+
$sql->alterTable($tableName);
83+
$sql->insert($tableName, $data);
84+
$sql->command($command); // for example $sql->command('SET NAMES "utf8"');
85+
$sql->comment($comment);
86+
```
87+
88+
You can add custom statements:
89+
90+
```php
91+
$sql->addStatement(new Statements\CreateTable($tableName));
92+
```
93+
94+
Check if is SQL document empty:
95+
96+
```php
97+
$sql->isEmpty();
98+
```
99+
100+
Generate SQL:
101+
102+
```php
103+
$sql->toSql($driver); // returns string
104+
$sql->getSqlQueries($driver); // returns string[]
105+
```
106+
107+
## Supported database
108+
109+
Currently is supported common SQL and MySQL.
110+
111+
73112
------------------------------
74113

75114
License: [New BSD License](license.md)

0 commit comments

Comments
 (0)