File tree Expand file tree Collapse file tree 6 files changed +6
-12
lines changed Expand file tree Collapse file tree 6 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ npm install @sqlitecloud/drivers
1717``` ts
1818import { Database } from ' @sqlitecloud/drivers'
1919
20- let database = new Database (' sqlitecloud://user:password@xxx.sqlite.cloud:8860/chinook.db ' )
20+ let database = new Database (' sqlitecloud://user:password@xxx.sqlite.cloud:8860/chinook.sqlite ' )
2121
2222let name = ' Breaking The Rules'
2323
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ <h1>SQLite Cloud Drivers</h1>
2020 type ="text "
2121 id ="connectionStringInput "
2222 placeholder ="Type your connection string here "
23- value ="sqlitecloud://admin:password@host.sqlite.cloud:8860/chinook.db "
23+ value ="sqlitecloud://admin:password@host.sqlite.cloud:8860/chinook.sqlite "
2424 class ="border rounded w-full pl-2 pr-2 mb-2 "
2525 />
2626 < div class ="text-sm w-12 "> sql:</ div >
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ <h2 id="status" class="pb-6 font-bold cursor-pointer">Disconnected</h2>
2525 type ="text "
2626 id ="connectionStringInput "
2727 placeholder ="Type your connection string here "
28- value ="sqlitecloud://admin:password@host.sqlite.cloud:8860/chinook.db "
28+ value ="sqlitecloud://admin:password@host.sqlite.cloud:8860/chinook.sqlite "
2929 class ="border rounded w-full pl-2 pr-2 mb-2 "
3030 />
3131 < div class ="text-xs w-12 "> sql</ div >
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ describe('connection-ws', () => {
339339 } )
340340
341341 it ( 'should select database' , done => {
342- chinook . sendCommands ( 'USE DATABASE chinook.db ;' , ( error , results ) => {
342+ chinook . sendCommands ( 'USE DATABASE chinook.sqlite ;' , ( error , results ) => {
343343 expect ( error ) . toBeNull ( )
344344 expect ( results . numberOfColumns ) . toBeUndefined ( )
345345 expect ( results . numberOfRows ) . toBeUndefined ( )
Original file line number Diff line number Diff line change @@ -11,9 +11,8 @@ import { parseConnectionString } from '../src/drivers/utilities'
1111import { SQLiteCloudTlsConnection } from '../src/drivers/connection-tls'
1212import { SQLiteCloudWebsocketConnection } from '../src/drivers/connection-ws'
1313
14- import * as dotenv from 'dotenv'
1514import { SQLiteCloudConnection , SQLiteCloudRowset } from '../src'
16- import e from 'express '
15+ import * as dotenv from 'dotenv '
1716dotenv . config ( )
1817
1918export const LONG_TIMEOUT = 1 * 60 * 1000 // 1 minute
@@ -68,7 +67,7 @@ otHL5/wB1MaAmCIcQjIxEshj8pSYTecthitmrneimikFf4KFK0YMvGgKrCLmJsg=
6867// chinook - read only database
6968//
7069
71- export const CHINOOK_DATABASE_FILE = join ( __dirname , 'assets/chinook.db ' )
70+ export const CHINOOK_DATABASE_FILE = join ( __dirname , 'assets/chinook.sqlite ' )
7271
7372export const CHINOOK_FIRST_TRACK = {
7473 AlbumId : 1 ,
Original file line number Diff line number Diff line change @@ -32,11 +32,6 @@ describe('prepareSql', () => {
3232 expect ( sql ) . toBe ( "UPDATE tbl SET name = 'bar' WHERE id = 42" )
3333 } )
3434
35- it ( 'should replace multiple ? parameter passed as array' , ( ) => {
36- const sql = prepareSql ( 'SELECT * FROM users WHERE name = ? AND last_name = ?' , [ 'John' , 'Doe' ] )
37- expect ( sql ) . toBe ( "SELECT * FROM users WHERE name = 'John' AND last_name = 'Doe'" )
38- } )
39-
4035 it ( "should replace string ? parameter containing ' character" , ( ) => {
4136 const sql = prepareSql ( 'SELECT * FROM phone WHERE name = ?' , "Jack's phone" )
4237 expect ( sql ) . toBe ( "SELECT * FROM phone WHERE name = 'Jack''s phone'" )
You can’t perform that action at this time.
0 commit comments