chore: make gosqltypes a standalone module

This commit is contained in:
Hein committed 2026-10-15 13:45:16 +02:00
1 parent 547c26fc5c
commit bf5278ba92
4 files changed
+132 -4

No files matched your search

+4 -4
View File
@@ -1,4 +1,4 @@
# sqltypes
# gosqltypes
Nullable SQL types for hand-written or generated Go models. Each type wraps a
value with a `Valid` flag and implements `database/sql.Scanner`,
@@ -8,14 +8,14 @@ round-tripped through JSON/YAML/XML, and written back to the database without
any per-format glue code.
This package is what the `bun` and `gorm` writers emit when generating models
with `--types sqltypes` (see [`pkg/writers/bun`](../writers/bun/README.md) and
[`pkg/writers/gorm`](../writers/gorm/README.md)). It can also be imported
with `--types sqltypes` (see the `bun` and
`gorm` writers in [relspecgo](https://git.warky.dev/wdevs/relspecgo)). It can also be imported
directly in hand-written models.
## Import
```go
import sql_types "git.warky.dev/wdevs/relspecgo/pkg/sqltypes"
import sql_types "git.warky.dev/wdevs/gosqltypes"
```
## Scalar types