Skip to content

Commit

Permalink
Changed dbConn for sqliteConnection variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
dave authored and oskardudycz committed Jan 21, 2025
1 parent d620c72 commit e19c23a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { afterEach, beforeEach, describe, it } from 'node:test';
import sqlite3 from 'sqlite3';
import { v4 as uuid } from 'uuid';
import { dbConn, type SQLiteConnection } from '../sqliteConnection';
import { sqliteConnection, type SQLiteConnection } from '../sqliteConnection';
import {
type DiscountApplied,
type PricedProductItem,
Expand All @@ -24,7 +24,7 @@ void describe('EventStoreDBEventStore', () => {

beforeEach(() => {
conn = new sqlite3.Database(':memory:');
db = dbConn(conn);
db = sqliteConnection(conn);
});

afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import { after, before, describe, it } from 'node:test';
import sqlite3 from 'sqlite3';
import { v4 as uuid } from 'uuid';
import { createEventStoreSchema } from '.';
import { dbConn, type SQLiteConnection } from '../../sqliteConnection';
import {
sqliteConnection,
type SQLiteConnection,
} from '../../sqliteConnection';
import { appendToStream } from './appendToStream';

export type PricedProductItem = {
Expand Down Expand Up @@ -38,7 +41,7 @@ void describe('appendEvent', () => {
before(async () => {
conn = new sqlite3.Database(':memory:');

db = dbConn(conn);
db = sqliteConnection(conn);
await createEventStoreSchema(db);
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import assert from 'assert';
import { after, before, describe, it } from 'node:test';
import sqlite3 from 'sqlite3';
import { dbConn, type SQLiteConnection } from '../../sqliteConnection';
import {
sqliteConnection,
type SQLiteConnection,
} from '../../sqliteConnection';
import { createEventStoreSchema } from '../schema';

type TableExists = {
Expand All @@ -26,7 +29,7 @@ void describe('createEventStoreSchema', () => {
before(async () => {
conn = new sqlite3.Database(':memory:');

db = dbConn(conn);
db = sqliteConnection(conn);

await createEventStoreSchema(db);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import { after, before, describe, it } from 'node:test';
import sqlite3 from 'sqlite3';
import { v4 as uuid } from 'uuid';
import { createEventStoreSchema } from '.';
import { dbConn, type SQLiteConnection } from '../../sqliteConnection';
import {
sqliteConnection,
type SQLiteConnection,
} from '../../sqliteConnection';
import { appendToStream } from './appendToStream';
import { readStream } from './readStream';

Expand Down Expand Up @@ -39,7 +42,7 @@ void describe('appendEvent', () => {
before(async () => {
conn = new sqlite3.Database(':memory:');

db = dbConn(conn);
db = sqliteConnection(conn);
await createEventStoreSchema(db);
});

Expand Down
2 changes: 1 addition & 1 deletion src/packages/emmett-sqlite/src/sqliteConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const isSQLiteError = (error: unknown): error is SQLiteError => {
return false;
};

export const dbConn = (conn: sqlite3.Database): SQLiteConnection => {
export const sqliteConnection = (conn: sqlite3.Database): SQLiteConnection => {
const db = conn;

return {
Expand Down

0 comments on commit e19c23a

Please sign in to comment.