PHP 7.4.33
Preview: driver.js Size: 1.59 KB
/var/www/gtechmarathon2026.bitkit.dk/httpdocs/node_modules/drizzle-orm/sqlite-proxy/driver.js
import { entityKind } from "../entity.js";
import { DefaultLogger } from "../logger.js";
import { createTableRelationsHelpers, extractTablesRelationalConfig } from "../relations.js";
import { BaseSQLiteDatabase } from "../sqlite-core/db.js";
import { SQLiteAsyncDialect } from "../sqlite-core/dialect.js";
import { SQLiteRemoteSession } from "./session.js";
class SqliteRemoteDatabase extends BaseSQLiteDatabase {
  static [entityKind] = "SqliteRemoteDatabase";
  async batch(batch) {
    return this.session.batch(batch);
  }
}
function drizzle(callback, batchCallback, config) {
  const dialect = new SQLiteAsyncDialect({ casing: config?.casing });
  let logger;
  let _batchCallback;
  let _config = {};
  if (batchCallback) {
    if (typeof batchCallback === "function") {
      _batchCallback = batchCallback;
      _config = config ?? {};
    } else {
      _batchCallback = void 0;
      _config = batchCallback;
    }
    if (_config.logger === true) {
      logger = new DefaultLogger();
    } else if (_config.logger !== false) {
      logger = _config.logger;
    }
  }
  let schema;
  if (_config.schema) {
    const tablesConfig = extractTablesRelationalConfig(
      _config.schema,
      createTableRelationsHelpers
    );
    schema = {
      fullSchema: _config.schema,
      schema: tablesConfig.tables,
      tableNamesMap: tablesConfig.tableNamesMap
    };
  }
  const session = new SQLiteRemoteSession(callback, dialect, schema, _batchCallback, { logger });
  return new SqliteRemoteDatabase("async", dialect, session, schema);
}
export {
  SqliteRemoteDatabase,
  drizzle
};
//# sourceMappingURL=driver.js.map

Directory Contents

Dirs: 0 × Files: 24
Name Size Perms Modified Actions
2.68 KB lrw-r--r-- 2025-07-10 12:54:57
Edit Download
4.43 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
1.36 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
1.36 KB lrw-r--r-- 2025-07-10 12:55:00
Edit Download
1.59 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
4.42 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
1.21 KB lrw-r--r-- 2025-07-10 12:54:58
Edit Download
226 B lrw-r--r-- 2025-07-10 12:54:59
Edit Download
61 B lrw-r--r-- 2025-07-10 12:54:59
Edit Download
59 B lrw-r--r-- 2025-07-10 12:55:00
Edit Download
92 B lrw-r--r-- 2025-07-10 12:54:59
Edit Download
187 B lrw-r--r-- 2025-07-10 12:54:59
Edit Download
2.21 KB lrw-r--r-- 2025-07-10 12:54:58
Edit Download
2.26 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
363 B lrw-r--r-- 2025-07-10 12:54:59
Edit Download
361 B lrw-r--r-- 2025-07-10 12:55:00
Edit Download
1.15 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
2.23 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
6.72 KB lrw-r--r-- 2025-07-10 12:54:58
Edit Download
12.17 KB lrw-r--r-- 2025-07-10 12:55:00
Edit Download
3.78 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
3.77 KB lrw-r--r-- 2025-07-10 12:55:00
Edit Download
5.37 KB lrw-r--r-- 2025-07-10 12:54:59
Edit Download
12.15 KB lrw-r--r-- 2025-07-10 12:55:00
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).