Skip to content

Commit

Permalink
docs: cleanup and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
si3nloong committed Nov 14, 2023
1 parent cca0c3d commit b8226c6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 89 deletions.
44 changes: 0 additions & 44 deletions .air.toml

This file was deleted.

37 changes: 0 additions & 37 deletions config.yml

This file was deleted.

7 changes: 0 additions & 7 deletions docs/BENCHMARK.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/MODELS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Format
`sql:"[column name],[tag options...]"`
```

Example:

```go
type User struct{
ID int64 `sql:",pk,auto_increment"`
Name string `sql:",size:10"`
}
```

Tags are case insensitive, however `snake_case` is preferred. Tags are optional to use when declaring models, `sqlgen` supports the following tags:

| Tag Name | Alias | Description | Example |
Expand Down
2 changes: 1 addition & 1 deletion docs/TYPE_MAPPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A scalar message field can have one of the following types – the table shows t
| `~string` | VARCHAR(255) | VARCHAR(255) | VARCHAR(255) |
| `~[]byte` | BLOB | BLOB | BLOB |
| `~[16]byte` | BINARY(16) | BINARY(16) | BINARY(16) |
| `sql.RawBytes` | VARCHAR(255) | VARCHAR(255) | VARCHAR(255) |
| `database/sql.RawBytes` | VARCHAR(255) | VARCHAR(255) | VARCHAR(255) |
| `~int` | INTEGER | INTEGER | INTEGER |
| `~int8` | TINYINT | TINYINT | TINYINT |
| `~int16` | SMALLINT | SMALLINT | SMALLINT |
Expand Down

0 comments on commit b8226c6

Please sign in to comment.