Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars-Erik Roald committed Jan 23, 2024
1 parent 0a06e8b commit 481c211
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 346 deletions.
88 changes: 0 additions & 88 deletions src/oracle.js

This file was deleted.

1 change: 0 additions & 1 deletion src/oracle/insert.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const newInsertCommandCore = require('./newInsertCommandCore');
const setSessionSingleton = require('../table/setSessionSingleton');
const newGetLastInsertedCommand = require('../table/commands/newGetLastInsertedCommand');
const executeQueries = require('../table/executeQueries');
const pushCommand = require('../table/commands/pushCommand');

function insert(table, row, options) {

Expand Down
12 changes: 1 addition & 11 deletions src/oracle/outputInsertedSql.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
function outputInsertedSql(table) {
function outputInsertedSql(_table) {
return '';
let separator = '';
let colNames = '';
let outParams = new Array(table._columns.length).fill('?');

for (let i = 0; i < table._columns.length; i++) {
colNames += separator + table._columns[i]._dbName;
separator = ',';
}
let result = `RETURNING ${colNames} INTO ${outParams}`;
return result;
}

module.exports = outputInsertedSql;
146 changes: 0 additions & 146 deletions src/oracle2.js

This file was deleted.

62 changes: 0 additions & 62 deletions src/oracle3.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/table/column/date/newEncode.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function _new(column) {
if (value == null) {
if (column.dbNull === null)
return newPara('null');
return newPara('\'' + column.dbNull + '\'');
return newPara('\'' + column.dbNull + '\'');
}
var context = getSessionContext();
var encodeCore = context.encodeDate || encodeDate;
Expand Down
1 change: 0 additions & 1 deletion src/table/rollback.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const releaseDbClient = require('./releaseDbClient');
const popChanges = require('./popChanges');
const newThrow = require('./newThrow');
const resultToPromise = require('./resultToPromise');
const { escape } = require('mysql2');
const conflictId = '12345678-1234-1234-1234-123456789012';

function rollback(e) {
Expand Down
2 changes: 1 addition & 1 deletion tests/classic.filters.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const major = parseInt(versionArray[0]);

const Order = rdb.table('torder');
Order.column('id').numeric().primary().notNullExceptInsert(),
Order.column('orderDate').date().notNull();
Order.column('orderDate').date().notNull();

const Lines = rdb.table('orderLine');
Lines.column('id').numeric().primary().notNullExceptInsert();
Expand Down
1 change: 0 additions & 1 deletion tests/dataTypes.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import rdb from '../src/index'
import { describe, test, beforeAll, afterAll, expect } from 'vitest';
import { fileURLToPath } from 'url';
const express = require('express');
Expand Down
26 changes: 13 additions & 13 deletions tests/dateformat.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ beforeAll(async () => {
const { db, init } = getDb(dbName);
await init(db);

// const george = await db.customer.insert({
// name: 'George',
// balance: 177,
// isActive: true
// });

// const john = await db.customer.insert({
// name: 'Harry',
// balance: 200,
// isActive: true
// });
// const date1 = new Date(2022, 0, 11, 9, 24, 47);
// const date2 = new Date(2021, 0, 11, 12, 22, 45);
// const george = await db.customer.insert({
// name: 'George',
// balance: 177,
// isActive: true
// });

// const john = await db.customer.insert({
// name: 'Harry',
// balance: 200,
// isActive: true
// });
// const date1 = new Date(2022, 0, 11, 9, 24, 47);
// const date2 = new Date(2021, 0, 11, 12, 22, 45);

// await db.order.insert([
// {
Expand Down
Loading

0 comments on commit 481c211

Please sign in to comment.