mirror of https://github.com/xiaoqidun/entps
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
5 days ago | |
---|---|---|
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
entps.go | 2 years ago | |
go.mod | 5 days ago | |
go.sum | 5 days ago |
README.md
entps
ent pure go sqlite3 driver
example
package main
import (
"context"
"log"
"<project>/ent"
_ "github.com/xiaoqidun/entps"
)
func main() {
client, err := ent.Open("sqlite3", "file:ent?mode=memory&cache=shared&_fk=1")
if err != nil {
log.Fatalf("failed opening connection to sqlite: %v", err)
}
defer client.Close()
if err := client.Schema.Create(context.Background()); err != nil {
log.Fatalf("failed creating schema resources: %v", err)
}
}