File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,6 +70,45 @@ COMMENT 'Clients table.'
7070ENGINE= 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
75114License: [ New BSD License] ( license.md )
You can’t perform that action at this time.
0 commit comments