mirror of
https://github.com/h-sphere/sql-seal.git
synced 2026-07-22 10:10:28 +00:00
fix: fixing issue with variables not being properly parsed
This commit is contained in:
parent
a41076943f
commit
f4493a5b75
6 changed files with 21 additions and 4 deletions
|
|
@ -1,3 +1,6 @@
|
|||
# 0.16.1
|
||||
Fixed issue with variables causing error. Now you can pass variables from your frontmatter with no problem.
|
||||
|
||||
# 0.16.0
|
||||
Now you can query tables in your note and use them as data source! [Check more information in the documentation](http://hypersphere.blog/sql-seal/query-markdown-tables.html).
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "sqlseal",
|
||||
"name": "SQLSeal",
|
||||
"version": "0.16.0",
|
||||
"version": "0.16.1",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Use SQL in your notes to query your vault files and CSV content.",
|
||||
"author": "hypersphere",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sqlseal",
|
||||
"version": "0.16.0",
|
||||
"version": "0.16.1",
|
||||
"description": "A plugin for Obsidian that allows you to run SQL queries on your notes.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ export const transformQuery = (query: string, tableNames: Record<string, string>
|
|||
dialect: 'sqlite',
|
||||
includeSpaces: true,
|
||||
includeComments: true,
|
||||
includeNewlines: true
|
||||
includeNewlines: true,
|
||||
paramTypes: ['@name']
|
||||
})
|
||||
|
||||
const watchTables: string[] = []
|
||||
|
|
|
|||
|
|
@ -47,4 +47,16 @@ numbers`
|
|||
mappedTables: []
|
||||
})
|
||||
})
|
||||
|
||||
it('should properly transform query with parameters', () => {
|
||||
const input = `WITH data(a) AS (
|
||||
VALUES(1),(2),(3),(5),(6),(7)
|
||||
)
|
||||
SELECT * FROM data WHERE a >= @test`
|
||||
|
||||
expect(transformQuery(input, { files: 'files' })).toEqual({
|
||||
sql: input,
|
||||
mappedTables: []
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
@ -23,5 +23,6 @@
|
|||
"0.14.0": "0.15.0",
|
||||
"0.14.1": "0.15.0",
|
||||
"0.15.0": "0.15.0",
|
||||
"0.16.0": "0.15.0"
|
||||
"0.16.0": "0.15.0",
|
||||
"0.16.1": "0.15.0"
|
||||
}
|
||||
Loading…
Reference in a new issue