@thinql/cli
v0.2.0
Published
Parse ThinQL queries to stdout as ThinQL or JSON AST
Downloads
2
Maintainers
Readme
@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
}
]
}
}