Skip to content

Commit

Permalink
feat: implement query context which allows per query customization of…
Browse files Browse the repository at this point in the history
… generated SQL
  • Loading branch information
retro committed Mar 24, 2024
1 parent 9d1dbc1 commit c946fb4
Show file tree
Hide file tree
Showing 10 changed files with 549 additions and 262 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ This library allows you to define models and their respective fields, including
import * as semanticLayer from "@verybigthings/semantic-layer";

const customersModel = semanticLayer
.model("customers")
.model()
.withName("customers")
.fromTable("Customer")
.withDimension("customer_id", {
type: "number",
Expand All @@ -53,7 +54,8 @@ const customersModel = semanticLayer
});

const invoicesModel = semanticLayer
.model("invoices")
.model()
.withName("invoices")
.fromTable("Invoice")
.withDimension("invoice_id", {
type: "number",
Expand All @@ -68,7 +70,8 @@ const invoicesModel = semanticLayer
});

const invoiceLinesModel = semanticLayer
.model("invoice_lines")
.model()
.withName("invoice_lines")
.fromTable("InvoiceLine")
.withDimension("invoice_line_id", {
type: "number",
Expand Down
Loading

0 comments on commit c946fb4

Please sign in to comment.