Skip to content

Commit

Permalink
Log sqlite3 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Jan 18, 2023
1 parent 02aa0c1 commit c6e1840
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@indutny/sneequals": "3.2.0",
"@popperjs/core": "2.11.6",
"@react-spring/web": "9.5.5",
"@signalapp/better-sqlite3": "8.0.4",
"@signalapp/better-sqlite3": "8.1.0",
"@signalapp/libsignal-client": "0.21.1",
"@signalapp/ringrtc": "2.23.0",
"@types/fabric": "4.5.3",
Expand Down
6 changes: 5 additions & 1 deletion ts/sql/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ let globalInstanceRenderer: Database | undefined;
let databaseFilePath: string | undefined;
let indexedDBPath: string | undefined;

SQL.setLogHandler((code, value) => {
logger.warn(`Database log code=${code}: ${value}`);
});

async function initialize({
configDir,
key,
Expand Down Expand Up @@ -4156,7 +4160,7 @@ async function getInstalledStickerPacks(): Promise<Array<StickerPackType>> {
SELECT *
FROM sticker_packs
WHERE
status IS "installed" OR
status IS 'installed' OR
storageID IS NOT NULL
ORDER BY id ASC
`
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2154,10 +2154,10 @@
"@react-spring/shared" "~9.5.5"
"@react-spring/types" "~9.5.5"

"@signalapp/better-sqlite3@8.0.4":
version "8.0.4"
resolved "https://registry.yarnpkg.com/@signalapp/better-sqlite3/-/better-sqlite3-8.0.4.tgz#53ed2074634b69e83116573b26ae1d927c4aab22"
integrity sha512-VCels5YMEDOr74fEW9nc2H9cVBosOPE75g+OOxDoa5nslABl+Cy6GkPGMUa3lwz/Mt5OaV8CAnLE9r3fdhVh1g==
"@signalapp/better-sqlite3@8.1.0":
version "8.1.0"
resolved "https://registry.yarnpkg.com/@signalapp/better-sqlite3/-/better-sqlite3-8.1.0.tgz#6ddbb759e4bbd572b343dc0e740836bb5c8edf0d"
integrity sha512-3KRDCfrlvoLYuCQ0MzcCtnzVaaivvejz6/XjCzV3tbECzH8SIc1PBASEMHSy4nAeqjY8MpETIwScW1613kFJiA==
dependencies:
bindings "^1.5.0"
tar "^6.1.0"
Expand Down

0 comments on commit c6e1840

Please sign in to comment.