@tmlmobilidade/go-clients-sqlite 20261027.2048.32 → 20261028.1757.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './sqlite-db.js';
2
2
  export * from './sqlite-map.js';
3
3
  export * from './sqlite-writer.js';
4
4
  export * from './types.js';
5
+ export { default as BSQLite3 } from 'better-sqlite3';
package/dist/index.js CHANGED
@@ -2,3 +2,4 @@ export * from './sqlite-db.js';
2
2
  export * from './sqlite-map.js';
3
3
  export * from './sqlite-writer.js';
4
4
  export * from './types.js';
5
+ export { default as BSQLite3 } from 'better-sqlite3';
package/dist/sqlite-db.js CHANGED
@@ -87,7 +87,7 @@ export class SQLiteTableInstance {
87
87
  this.tableName = tableName;
88
88
  // Create table
89
89
  this.databaseInstance
90
- .prepare(`CREATE TABLE IF NOT EXISTS ${this.tableName} (${params.columns.map(c => `"${c.name}" ${c.type}`).join(', ')})`)
90
+ .prepare(`CREATE TABLE IF NOT EXISTS ${this.tableName} (${params.columns.map(c => `"${c.name.replaceAll('"', '""')}" ${c.type}`).join(', ')})`)
91
91
  .run();
92
92
  // Create indexes
93
93
  params.columns.forEach((c) => {
@@ -98,7 +98,7 @@ export class SQLiteTableInstance {
98
98
  //
99
99
  // Prepare insert statement
100
100
  const placeholders = this.columns.map(() => '?').join(', ');
101
- const insertSQL = `INSERT INTO ${this.tableName} (${this.columns.map(c => `"${c.name}"`).join(', ')}) VALUES (${placeholders})`;
101
+ const insertSQL = `INSERT INTO ${this.tableName} (${this.columns.map(c => `"${c.name.replaceAll('"', '""')}"`).join(', ')}) VALUES (${placeholders})`;
102
102
  this.insertStatement = this.databaseInstance.prepare(insertSQL);
103
103
  }
104
104
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/go-clients-sqlite",
3
- "version": "20261027.2048.32",
3
+ "version": "20261028.1757.52",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"