Skip to content

Commit

Permalink
parse drop view stmt (#245)
Browse files Browse the repository at this point in the history
* parse drop view stmt

* fix completion test
  • Loading branch information
joe-re authored Nov 14, 2024
1 parent 03ef816 commit c3f2800
Show file tree
Hide file tree
Showing 5 changed files with 1,181 additions and 685 deletions.
5 changes: 3 additions & 2 deletions packages/server/test/complete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,12 @@ describe('keyword completion', () => {
expect(result.candidates[0].label).toEqual('DELETE')
})

test("complete 'DROP'/'DROP TABLE' keyword", () => {
test("complete 'DROP'/'DROP TABLE'/'DROP VIEW' keyword", () => {
const sql = 'DR'
const result = complete(sql, { line: 0, column: sql.length })
expect(result.candidates.length).toEqual(2)
expect(result.candidates.length).toEqual(3)
expect(result.candidates.map((v) => v.label)).toContain('DROP TABLE')
expect(result.candidates.map((v) => v.label)).toContain('DROP VIEW')
expect(result.candidates.map((v) => v.label)).toContain('DROP')
})
})
Expand Down
Loading

0 comments on commit c3f2800

Please sign in to comment.