proxy.golang.org : github.com/gildas/go-sql
Package go-sql is an SQL library that adds Higher Level capabilities to the standard `database/sql` library. Example: For the sake of readability, I removed the error management. DON'T! As you can see, using actual GO struct types is rather easy now. We do not support the entire set of SQL types or GO types, but we have the basics. We also support time.Time, `uuid.UUID` from https://pkg.go.dev/github.com/google/uuid, pointers for simple types, and foreign keys, this is how you would use these: import "github.com/google/uuid" Note that for the foreign keys to work, - The target field must be a pointer to a struct, - the target `struct` must implement the database/sql Scanner (https://pkg.go.dev/database/sql?tab=doc#Scanner) interface, - the target `struct` key must be a uuid.UUID, string, or int (any type of int) You can also use the Statement object level of using the Database:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/gildas/go-sql
License: MIT
Latest release: about 5 years ago
First release: about 5 years ago
Namespace: github.com/gildas
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 12 days ago