Get all by stream
g.sys.db.getAllByStream calls the get all by stream schema API of any table from your code, with the same headers and query parameters as over HTTP. Each row goes to your function as the database sends it, so a large table never sits in memory at once.
Get all using stream API¶
With header¶
With queryParams¶
Structure¶
Multi-tenant¶
instance: "crm::acme"works on the database of the tenantacmeof the multi-tenant instancecrm.- With
instance: "crm", the call works on the database of the tenant of the request: a custom API called with the x-am-tenant-username header passes it on to the APIs it calls. A request without a tenant works on the structure database.
| Get all customers of the tenant acme by stream | |
|---|---|
Without a schema¶
g.sys.db.gen.getAllByStreamGen takes the same arguments and calls the get all by stream generated API : no schema, so the data is read and written as it is in the table, without the conversions, validations and defaults of the schema.
| Language | The call |
|---|---|
| TypeScript | g.sys.db.gen.getAllByStreamGen(…) |
| Python | g.sys.db.gen.get_all_by_stream_gen(…) |
| PHP | $g->sys->db->gen->getAllByStreamGen(…) |
| C#, Go | g.Sys.Db.Gen.GetAllByStreamGen(…) |
| Rust | g.sys.db.get_all_by_stream_gen(GetAll::new(…)) |
| Java, Kotlin | g.sys.db.gen.getAllByStreamGen(…) |