From 5ef3b6fe86ec7bffa32736549771f62d80584485 Mon Sep 17 00:00:00 2001 From: Kirk Date: Wed, 22 May 2024 15:19:06 +1200 Subject: [PATCH] Added comment regarding using sqlite legacy for openDatabase --- code/16-sqlite-getting-started/util/database.js | 2 ++ code/17-inserting-places-into-the-db/util/database.js | 2 ++ code/18-fetching-places-from-the-database/util/database.js | 2 ++ code/19-fetching-place-detail-data/util/database.js | 2 ++ code/20-finished/util/database.js | 2 ++ 5 files changed, 10 insertions(+) diff --git a/code/16-sqlite-getting-started/util/database.js b/code/16-sqlite-getting-started/util/database.js index 75997ad..aa27a0c 100644 --- a/code/16-sqlite-getting-started/util/database.js +++ b/code/16-sqlite-getting-started/util/database.js @@ -1,4 +1,6 @@ import * as SQLite from 'expo-sqlite'; +// openDatabase has been removed from the stable version of expo-sqlite +//import * as SQLite from 'expo-sqlite/legacy'; const database = SQLite.openDatabase('places.db'); diff --git a/code/17-inserting-places-into-the-db/util/database.js b/code/17-inserting-places-into-the-db/util/database.js index 63ec073..2d4f27f 100644 --- a/code/17-inserting-places-into-the-db/util/database.js +++ b/code/17-inserting-places-into-the-db/util/database.js @@ -1,4 +1,6 @@ import * as SQLite from 'expo-sqlite'; +// openDatabase has been removed from the stable version of expo-sqlite +//import * as SQLite from 'expo-sqlite/legacy'; const database = SQLite.openDatabase('places.db'); diff --git a/code/18-fetching-places-from-the-database/util/database.js b/code/18-fetching-places-from-the-database/util/database.js index 2ffa09c..0df5b53 100644 --- a/code/18-fetching-places-from-the-database/util/database.js +++ b/code/18-fetching-places-from-the-database/util/database.js @@ -1,4 +1,6 @@ import * as SQLite from 'expo-sqlite'; +// openDatabase has been removed from the stable version of expo-sqlite +//import * as SQLite from 'expo-sqlite/legacy'; import { Place } from '../models/place'; diff --git a/code/19-fetching-place-detail-data/util/database.js b/code/19-fetching-place-detail-data/util/database.js index 6249575..bb0e321 100644 --- a/code/19-fetching-place-detail-data/util/database.js +++ b/code/19-fetching-place-detail-data/util/database.js @@ -1,4 +1,6 @@ import * as SQLite from 'expo-sqlite'; +// openDatabase has been removed from the stable version of expo-sqlite +//import * as SQLite from 'expo-sqlite/legacy'; import { Place } from '../models/place'; diff --git a/code/20-finished/util/database.js b/code/20-finished/util/database.js index 1abd9bc..0985cb9 100644 --- a/code/20-finished/util/database.js +++ b/code/20-finished/util/database.js @@ -1,4 +1,6 @@ import * as SQLite from 'expo-sqlite'; +// openDatabase has been removed from the stable version of expo-sqlite +//import * as SQLite from 'expo-sqlite/legacy'; import { Place } from '../models/place';