Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modules/sync/sync/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ParserTableDefinition } from "../syncStrategy/types";
import { SyncStrategyFactory } from "../syncStrategy/SyncStrategyFactory";


const SQLSEAL_DATABASE_VERSION = 2;
const SQLSEAL_DATABASE_VERSION = 3;

// Global lock to prevent concurrent database recreation
let isInitializing = false;
Expand Down
8 changes: 4 additions & 4 deletions src/utils/sanitiseColumn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ describe('sanitise', () => {
})

it('should sanitise reserved keywords', () => {
expect(sanitise('BEGIN')).toEqual('begin_')
expect(sanitise('AS')).toEqual('as_')
expect(sanitise('BEGIN AS')).toEqual('begin_as')
expect(sanitise('BEGIN')).toEqual('BEGIN_')
expect(sanitise('AS')).toEqual('AS_')
expect(sanitise('BEGIN AS')).toEqual('BEGIN_AS')
})

it('should properly normalise non-latin characters', () => {
expect(sanitise('ćwiczenia')).toEqual('cwiczenia')
expect(sanitise('część')).toEqual('czesc')
expect(sanitise('geändert')).toEqual('geandert')
expect(sanitise('หมวดหมู่')).toEqual('hmwdhmuu')
expect(sanitise('类别')).toEqual('lei_bie')
expect(sanitise('类别')).toEqual('Lei_Bie')
expect(sanitise('категория')).toEqual('kategoriia')
expect(sanitise('カテゴリ')).toEqual('kategori')
expect(sanitise('ノートタイプ')).toEqual('nototaipu')
Expand Down
2 changes: 1 addition & 1 deletion src/utils/sanitiseColumn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ export function sanitise(input: string): string {
sanitized += '_';
}

return sanitized.toLowerCase();
return sanitized;
}
Loading