Skip to content

Commit 0d704c8

Browse files
author
Reinaldy Rafli
authored
docs: grammar
1 parent 0a8dbef commit 0d704c8

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ import "github.com/aldy505/bob"
1212

1313
## Usage
1414

15-
It's not ready for large-scale production yet (I've already using it on one of my projects). But, the API is probably close to how you'd do things on Squirrel.
15+
It's not ready for large-scale production yet (although I've already using it on one of my projects). But, the API is probably close to how you'd do things on Squirrel.
1616

1717
### Create a table
1818

1919
```go
2020
import "github.com/aldy505/bob"
2121

2222
func main() {
23-
// Note that CREATE TABLE don't return args params.
23+
// Note that CREATE TABLE doesn't returns args params.
2424
sql, _, err := bob.
2525
CreateTable("tableName").
2626
// The first parameter is the column's name.
2727
// The second parameters and so on forth are extras.
2828
StringColumn("id", "NOT NULL", "PRIMARY KEY", "AUTOINCREMENT").
2929
StringColumn("email", "NOT NULL", "UNIQUE").
30-
// See the list of available column definition type through pkg.go.dev or scroll down below.
30+
// See the list of available column definition types through pkg.go.dev or scroll down below.
3131
TextColumn("password").
32-
// Or add your custom types
32+
// Or add your custom type.
3333
AddColumn(bob.ColumnDef{Name: "tableName", Type: "customType", Extras: []string{"NOT NULL"}}).
3434
ToSql()
3535
if err != nil {
@@ -38,7 +38,7 @@ func main() {
3838
}
3939
```
4040

41-
Available column definition types:
41+
Available column definition types (please be aware that some only works on certain database):
4242
* `StringColumn()` - Default to `VARCHAR(255)`
4343
* `TextColumn()` - Default to `TEXT`
4444
* `UUIDColumn()` - Defaults to `UUID`
@@ -81,7 +81,7 @@ func main() {
8181
}
8282
```
8383

84-
### Placeholder format
84+
### Placeholder format / Dialect
8585

8686
Default placeholder is a question mark (MySQL-like). If you want to change it, simply use something like this:
8787

@@ -141,7 +141,6 @@ func main() {
141141

142142
if !hasTableUsers {
143143
// Create "users" table
144-
// Note that this will return multiple query in a single string.
145144
sql, _, err := bob.
146145
CreateTable("users").
147146
IntegerColumn("id", "PRIMARY KEY", "SERIAL").
@@ -203,4 +202,4 @@ Contributions are always welcome! As long as you add a test for your changes.
203202

204203
## License
205204

206-
Bob is licensed under [MIT license](./LICENSE)
205+
Bob is licensed under [MIT license](./LICENSE)

0 commit comments

Comments
 (0)