Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Guide - Examples #163

Open
OJ423 opened this issue Aug 22, 2022 · 2 comments
Open

CLI Guide - Examples #163

OJ423 opened this issue Aug 22, 2022 · 2 comments
Assignees

Comments

@OJ423
Copy link
Contributor

OJ423 commented Aug 22, 2022

https://terminusdb.gitbook.io/new-docs-structure/guides/interface-guides/cli

  1. Should we include example code snippets as well as the terminusdb query DB_SPEC QUERY OPTIONS sections?
@daramcq
Copy link

daramcq commented Nov 5, 2022

Please add a couple of examples for this.

@daramcq
Copy link

daramcq commented Nov 5, 2022

To give you an example of what could be useful. I've created a database as such:

{
  "@base": "terminusdb:///data/",
  "@schema": "terminusdb:///schema#",
  "@type": "@context"
}
{
  "@id": "Person",
  "@type": "Class",
  "age": "xsd:integer",
  "name": "xsd:string"
}

I've added documents as such:

{
  "@id": "Person/f0e5fded47f2bd24773ece320b0d2ce064406bd634328acb50e807af3753c4c3",
  "@type": "Person",
  "age": 24,
  "name": "Jim"
}
{
  "@id": "Person/1b42045a08655bd0c299b9deb89f15b3bb9a9abab495136b9c9bccedd8451d99",
  "@type": "Person",
  "age": 28,
  "name": "Jemma"
}

I've been trying to write a query to show me the oldest person in the database, or simply to select the person with age 28. I haven't found anything in the documentation or videos that can help me do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants