refactor friendly name to just be name (#29)

This commit is contained in:
Jim authored and GitHub committed 2020-05-05 16:35:24 -04:00
1 parent c6a9c970b0
commit 725a777baf
6 files changed
+109 -128

No files matched your search

+2 -2
View File
@@ -19,14 +19,14 @@ Just some high-level usage highlights to get you started. Read the godocs for a
err = rw.Create(context.Background(), user)
// There are reader methods like: LookupByPublicId,
// LookupByFriendlyName, SearchBy, LookupBy, etc
// LookupByName, SearchBy, LookupBy, etc
// which will lookup resources for you and scan them into your Gorm struct
err = rw.LookupByPublicId(context.Background(), foundUser)
// There's reader ScanRows that facilitates scanning rows from
// a "raw" SQL query into your Gorm struct
tx, err := rw.DB()
where := "select * from test_users where friendly_name in ($1, $2)"
where := "select * from test_users where name in ($1, $2)"
rows, err := tx.Query(where, "alice", "bob")
defer rows.Close()
for rows.Next() {