@thinql/cli

0.2.0 • Public • Published

@thinql/cli

Parse ThinQL queries to stdout as ThinQL or JSON AST

Installation

# npm
npm install @thinql/cli

# yarn
yarn add @thinql/cli

Examples

thinql 'hello world'
hello world
---
Statement [1:1] {
  expression: LogicalAndExpression [1:1] {
    assertions: [
      Assertion [1:1] {
        assertion: FullTextSearch [1:1] {
          value: Value [1:1] {
            content: 'hello',
            literal: false
          }
        },
        negated: false
      },
      Assertion [1:7] {
        assertion: FullTextSearch [1:7] {
          value: Value [1:7] {
            content: 'world',
            literal: false
          }
        },
        negated: false
      }
    ]
  }
}

thinql 'hello world' --query
hello world
---
hello world

$ thinql 'hello world' --json
hello world
---
hello world
---
{
  "$type": "Statement",
  "expression": {
    "$type": "LogicalAndExpression",
    "assertions": [
      {
        "$type": "Assertion",
        "assertion": {
          "$type": "FullTextSearch",
          "value": {
            "$type": "Value",
            "content": "hello",
            "literal": false
          }
        },
        "negated": false
      },
      {
        "$type": "Assertion",
        "assertion": {
          "$type": "FullTextSearch",
          "value": {
            "$type": "Value",
            "content": "world",
            "literal": false
          }
        },
        "negated": false
      }
    ]
  }
}

Package Sidebar

Install

npm i @thinql/cli

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

10 kB

Total Files

6

Last publish

Collaborators

  • mmiller42