Skip to content

Commit

Permalink
Removed version, size and description args from openDatabase as they …
Browse files Browse the repository at this point in the history
…are not being used
  • Loading branch information
chintannp committed Mar 28, 2022
1 parent cb1be23 commit 611cc7b
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ import { CommonSQLiteDatabase, ParameterizedStatement } from '../common/types';
const logger = new Logger('ExpoSQLiteDatabase');

const DB_NAME = 'AmplifyDatastore';
const DB_DISPLAY_NAME = 'AWS Amplify DataStore SQLite Database';

// TODO: make these configurable
const DB_SIZE = 200000;
const DB_VERSION = '1.0';

/*
Expand All @@ -30,7 +25,10 @@ class ExpoSQLiteDatabase implements CommonSQLiteDatabase {
// only open database once.

if (!this.db) {
this.db = openDatabase(DB_NAME, DB_VERSION, DB_DISPLAY_NAME, DB_SIZE);
// As per expo docs version, description and size arguments are ignored,
// but are accepted by the function for compatibility with the WebSQL specification.
// Hence, we do not need those arguments.
this.db = openDatabase(DB_NAME);
}
}

Expand Down

0 comments on commit 611cc7b

Please sign in to comment.