Last active
February 8, 2022 12:15
-
-
Save asim/8fa125e3c27db7148eb0d94048bd50b2 to your computer and use it in GitHub Desktop.
Revisions
-
asim revised this gist
Feb 8, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import ( func main() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) rsp, err := dbService.Read(&db.ReadRequest{ Query: "age == 42", Table: "example", }) fmt.Println(rsp, err) -
asim created this gist
Feb 8, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ package main import ( "fmt" "os" "go.m3o.com/db" ) // Read data from a table. Lookup can be by ID or via querying any field in the record. func main() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) rsp, err := dbService.Read(&db.ReadRequest{ Query: "age == 43", Table: "example", }) fmt.Println(rsp, err) }