Skip to content

Instantly share code, notes, and snippets.

@brfrn169
Created April 28, 2022 01:34
Show Gist options
  • Save brfrn169/e5a6fd1c1a1cf36a7fb0e575eb5020d0 to your computer and use it in GitHub Desktop.
Save brfrn169/e5a6fd1c1a1cf36a7fb0e575eb5020d0 to your computer and use it in GitHub Desktop.
How to Get Started with Scalar DB
{
"sample.customers": {
"transaction": true,
"partition-key": [
"customer_id"
],
"columns": {
"customer_id": "INT",
"name": "TEXT",
"credit_limit": "INT",
"credit_total": "INT"
}
},
"sample.orders": {
"transaction": true,
"partition-key": [
"customer_id"
],
"clustering-key": [
"timestamp"
],
"secondary-index": [
"order_id"
],
"columns": {
"order_id": "TEXT",
"customer_id": "INT",
"timestamp": "BIGINT"
}
},
"sample.statements": {
"transaction": true,
"partition-key": [
"order_id"
],
"clustering-key": [
"item_id"
],
"columns": {
"order_id": "TEXT",
"item_id": "INT",
"count": "INT"
}
},
"sample.items": {
"transaction": true,
"partition-key": [
"item_id"
],
"columns": {
"item_id": "INT",
"name": "TEXT",
"price": "INT"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment