You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/sqlite.spec.js
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -200,4 +200,10 @@ describe('sqlite', () => {
200
200
`
201
201
expect(getParsedSql(sql)).to.be.equal(`SELECT SUM("Hours Spent") AS "Total Hours" FROM "Work_Records" WHERE "Partner ID" = (SELECT "Partner ID" FROM "Employees" WHERE "Firstname" = 'John' AND "Lastname" = 'Smith')`)
202
202
})
203
+
it('should support create index',()=>{
204
+
letsql='CREATE INDEX visits_url_index ON visits (url);'
205
+
expect(getParsedSql(sql)).to.be.equal('CREATE INDEX "visits_url_index" ON "visits" ("url")')
206
+
sql='CREATE INDEX if not exists schema_name.visits_url_index ON visits (url collate cn asc) where id > 10;'
207
+
expect(getParsedSql(sql)).to.be.equal('CREATE INDEX IF NOT EXISTS "schema_name"."visits_url_index" ON "visits" ("url" COLLATE cn ASC) WHERE "id" > 10')
0 commit comments