Skip to content

Commit

Permalink
Readme: updated
Browse files Browse the repository at this point in the history
  • Loading branch information
janpecha committed Apr 24, 2018
1 parent 29b4593 commit b3bc928
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,45 @@ COMMENT 'Clients table.'
ENGINE=InnoDB;
```


## Statements

There is few predefined statements:

```php
$sql->createTable($tableName);
$sql->dropTable($tableName);
$sql->renameTable($old, $new);
$sql->alterTable($tableName);
$sql->insert($tableName, $data);
$sql->command($command); // for example $sql->command('SET NAMES "utf8"');
$sql->comment($comment);
```

You can add custom statements:

```php
$sql->addStatement(new Statements\CreateTable($tableName));
```

Check if is SQL document empty:

```php
$sql->isEmpty();
```

Generate SQL:

```php
$sql->toSql($driver); // returns string
$sql->getSqlQueries($driver); // returns string[]
```

## Supported database

Currently is supported common SQL and MySQL.


------------------------------

License: [New BSD License](license.md)
Expand Down

0 comments on commit b3bc928

Please sign in to comment.