• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rogerpadilla / uql / 20684188712

03 Jan 2026 11:05PM UTC coverage: 95.31% (-2.8%) from 98.157%
20684188712

push

github

rogerpadilla
refactor: Migrate testing infrastructure to Vitest, add new querier pools, and expand test coverage.

1250 of 1388 branches covered (90.06%)

Branch coverage included in aggregate %.

108 of 117 new or added lines in 14 files covered. (92.31%)

51 existing lines in 14 files now uncovered.

3383 of 3473 relevant lines covered (97.41%)

223.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.47
/packages/core/src/sqlite/sqliteQuerierPool.ts
1
import type { Options } from 'better-sqlite3';
2
import { AbstractQuerierPool } from '../querier/index.js';
3
import type { ExtraOptions } from '../type/index.js';
4
import { SqliteQuerier } from './sqliteQuerier.js';
5

6
export class Sqlite3QuerierPool extends AbstractQuerierPool<SqliteQuerier> {
7
  private querier: SqliteQuerier;
8

9
  constructor(
10
    readonly filename?: string | Buffer,
11
    readonly opts?: Options,
12
    extra?: ExtraOptions,
13
  ) {
14
    super('sqlite', extra);
3✔
15
  }
16

17
  async getQuerier() {
18
    if (!this.querier) {
74✔
19
      let db: any;
20
      if (typeof Bun !== 'undefined') {
3!
UNCOV
21
        const { Database } = await import('bun:sqlite');
×
UNCOV
22
        db = new Database(this.filename as string, this.opts as any);
×
UNCOV
23
        db.run('PRAGMA journal_mode = WAL');
×
24
      } else {
25
        const { default: Database } = await import('better-sqlite3');
3✔
26
        db = new Database(this.filename, this.opts);
3✔
27
        db.pragma('journal_mode = WAL');
3✔
28
      }
29
      this.querier = new SqliteQuerier(db, this.extra);
3✔
30
    }
31
    return this.querier;
74✔
32
  }
33

34
  async end() {
35
    await this.querier.db.close();
3✔
36
    delete this.querier;
3✔
37
  }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc