diff --git a/README.md b/README.md index 4aafa77..f6370ba 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,10 @@ once you have the schama files created you can use `pgm` as ```go package main -import "code.partial.tech/go/pgm" +import ( + "code.partial.tech/go/pgm" + "myapp/db/user" // scham create by pgm/cmd +) type MyModel struct { ID string @@ -64,8 +67,8 @@ func main() { // Select query to fetch the first record // Assumes the schema is defined in the "db" package with a User table var v MyModel - err := db.User.Select(db.User.ID, db.User.Email). - Where(db.User.Email.Like("anki%")). + err := db.User.Select(user.ID, user.Email). + Where(user.Email.Like("anki%")). First(context.TODO(), &v.ID, &v.Email) if err != nil { println("Error:", err.Error())