mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 19:05:12 +00:00
19 lines
333 B
Go
Executable File
19 lines
333 B
Go
Executable File
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)
|
|
}
|