Skip to content

Commit

Permalink
refactor: scope database class inside it's own directory
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jan 12, 2020
1 parent be0a7d4 commit a97a7da
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Connection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { LoggerContract } from '@poppinss/logger'
import { patchKnex } from 'knex-dynamic-connection'

import { ConnectionConfigContract, ConnectionContract } from '@ioc:Adonis/Addons/Database'
import { QueryClient } from '../QueryClient'
import { QueryClient } from '../Database/QueryClient'

/**
* Connection class manages a given database connection. Internally it uses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/

/// <reference path="../../adonis-typings/database.ts" />
/// <reference path="../../../adonis-typings/database.ts" />

import * as knex from 'knex'
import { ChainableContract, QueryCallback } from '@ioc:Adonis/Addons/DatabaseQueryBuilder'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/

/// <reference path="../../adonis-typings/database.ts" />
/// <reference path="../../../adonis-typings/database.ts" />

import * as knex from 'knex'
import { Exception } from '@poppinss/utils'
Expand All @@ -20,7 +20,7 @@ import {
} from '@ioc:Adonis/Addons/DatabaseQueryBuilder'

import { Chainable } from './Chainable'
import { executeQuery, isInTransaction } from '../utils'
import { executeQuery, isInTransaction } from '../../utils'

/**
* Wrapping the user function for a query callback and give them
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/

/// <reference path="../../adonis-typings/database.ts" />
/// <reference path="../../../adonis-typings/database.ts" />

import * as knex from 'knex'
import { Exception } from '@poppinss/utils'
Expand All @@ -18,7 +18,7 @@ import {
QueryClientContract,
} from '@ioc:Adonis/Addons/DatabaseQueryBuilder'

import { executeQuery, isInTransaction } from '../utils'
import { executeQuery, isInTransaction } from '../../utils'

/**
* Exposes the API for performing SQL inserts
Expand Down
4 changes: 2 additions & 2 deletions src/QueryBuilder/Raw.ts → src/Database/QueryBuilder/Raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/

/// <reference path="../../adonis-typings/database.ts" />
/// <reference path="../../../adonis-typings/database.ts" />

import * as knex from 'knex'
import { Exception } from '@poppinss/utils'
Expand All @@ -17,7 +17,7 @@ import {
TransactionClientContract,
QueryClientContract,
} from '@ioc:Adonis/Addons/DatabaseQueryBuilder'
import { executeQuery } from '../utils'
import { executeQuery } from '../../utils'

/**
* Exposes the API to execute raw queries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/

/// <reference path="../../adonis-typings/database.ts" />
/// <reference path="../../../adonis-typings/database.ts" />

import * as knex from 'knex'
import { Exception } from '@poppinss/utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/

/// <reference path="../../adonis-typings/database.ts" />
/// <reference path="../../../adonis-typings/database.ts" />

import * as knex from 'knex'
import { ProfilerRowContract, ProfilerContract } from '@poppinss/profiler'
Expand Down
6 changes: 3 additions & 3 deletions test-helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import {
QueryClientContract,
} from '@ioc:Adonis/Addons/DatabaseQueryBuilder'

import { RawQueryBuilder } from '../src/QueryBuilder/Raw'
import { InsertQueryBuilder } from '../src/QueryBuilder/Insert'
import { DatabaseQueryBuilder } from '../src/QueryBuilder/Database'
import { RawQueryBuilder } from '../src/Database/QueryBuilder/Raw'
import { InsertQueryBuilder } from '../src/Database/QueryBuilder/Insert'
import { DatabaseQueryBuilder } from '../src/Database/QueryBuilder/Database'

export const fs = new Filesystem(join(__dirname, 'tmp'))
dotenv.config()
Expand Down
2 changes: 1 addition & 1 deletion test/query-builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import * as test from 'japa'
import { Connection } from '../src/Connection'
import { DatabaseQueryBuilder } from '../src/QueryBuilder/Database'
import { DatabaseQueryBuilder } from '../src/Database/QueryBuilder/Database'
import {
getConfig,
setup,
Expand Down

0 comments on commit a97a7da

Please sign in to comment.