File tree 7 files changed +14
-1
lines changed
7 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex {
28
28
constructor ( private readonly ide : IDE ) { }
29
29
30
30
private static async _createTables ( db : DatabaseConnection ) {
31
+ await db . exec ( "PRAGMA journal_mode=WAL;" ) ;
32
+
31
33
await db . exec ( `CREATE TABLE IF NOT EXISTS code_snippets (
32
34
id INTEGER PRIMARY KEY,
33
35
path TEXT NOT NULL,
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ export class FullTextSearchCodebaseIndex implements CodebaseIndex {
20
20
artifactId = "sqliteFts" ;
21
21
22
22
private async _createTables ( db : DatabaseConnection ) {
23
+ await db . exec ( "PRAGMA journal_mode=WAL;" ) ;
24
+
23
25
await db . exec ( `CREATE VIRTUAL TABLE IF NOT EXISTS fts USING fts5(
24
26
path,
25
27
content,
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ export class LanceDbIndex implements CodebaseIndex {
46
46
}
47
47
48
48
private async createSqliteCacheTable ( db : DatabaseConnection ) {
49
+ await db . exec ( "PRAGMA journal_mode=WAL;" ) ;
50
+
49
51
await db . exec ( `CREATE TABLE IF NOT EXISTS lance_db_cache (
50
52
uuid TEXT PRIMARY KEY,
51
53
cacheKey TEXT NOT NULL,
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ export class ChunkCodebaseIndex implements CodebaseIndex {
24
24
}
25
25
26
26
private async _createTables ( db : DatabaseConnection ) {
27
+ await db . exec ( "PRAGMA journal_mode=WAL;" ) ;
28
+
27
29
await db . exec ( `CREATE TABLE IF NOT EXISTS chunks (
28
30
id INTEGER PRIMARY KEY AUTOINCREMENT,
29
31
cacheKey TEXT NOT NULL,
Original file line number Diff line number Diff line change @@ -476,7 +476,8 @@ export default class DocsService {
476
476
477
477
await runSqliteMigrations ( db ) ;
478
478
479
- db . exec ( `CREATE TABLE IF NOT EXISTS ${ DocsService . sqlitebTableName } (
479
+ await db . exec ( "PRAGMA journal_mode=WAL;" ) ;
480
+ await db . exec ( `CREATE TABLE IF NOT EXISTS ${ DocsService . sqlitebTableName } (
480
481
id INTEGER PRIMARY KEY AUTOINCREMENT,
481
482
title STRING NOT NULL,
482
483
startUrl STRING NOT NULL UNIQUE,
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ export class SqliteDb {
23
23
static db : DatabaseConnection | null = null ;
24
24
25
25
private static async createTables ( db : DatabaseConnection ) {
26
+ await db . exec ( "PRAGMA journal_mode=WAL;" ) ;
27
+
26
28
await db . exec (
27
29
`CREATE TABLE IF NOT EXISTS tag_catalog (
28
30
id INTEGER PRIMARY KEY AUTOINCREMENT,
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ export class DevDataSqliteDb {
8
8
static db : DatabaseConnection | null = null ;
9
9
10
10
private static async createTables ( db : DatabaseConnection ) {
11
+ await db . exec ( "PRAGMA journal_mode=WAL;" ) ;
12
+
11
13
await db . exec (
12
14
`CREATE TABLE IF NOT EXISTS tokens_generated (
13
15
id INTEGER PRIMARY KEY AUTOINCREMENT,
You can’t perform that action at this time.
0 commit comments