File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import { open } from 'react-native-nitro-sqlite'
77
88const chance = new Chance ( )
99
10+ export const TEST_DB_NAME = 'test'
11+
1012export let testDb : NitroSQLiteConnection | undefined
1113export function resetTestDb ( ) {
1214 try {
@@ -15,13 +17,15 @@ export function resetTestDb() {
1517 testDb . delete ( )
1618 }
1719 testDb = open ( {
18- name : 'test' ,
20+ name : TEST_DB_NAME ,
1921 } )
2022 } catch ( e ) {
2123 console . warn ( 'Error resetting user database' , e )
2224 }
2325}
2426
27+ const LARGE_DB_NAME = 'large'
28+
2529// Copyright 2024 Oscar Franco
2630// Taken from "op-sqlite" example project.
2731// Used to demonstrate the performance of NitroSQLite.
@@ -34,7 +38,7 @@ export function resetLargeDb() {
3438 largeDb . delete ( )
3539 }
3640 largeDb = open ( {
37- name : 'large' ,
41+ name : LARGE_DB_NAME ,
3842 } )
3943
4044 largeDb . execute (
You can’t perform that action at this time.
0 commit comments