Skip to content

Commit

Permalink
add: verify initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
codyzu committed Sep 3, 2016
1 parent 1f3f442 commit 89b8b9b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const DEFAULT_OPTIONS = {

export default class Jasql {
constructor (opts) {
this.initialized = false
let options = defaults({}, opts, DEFAULT_OPTIONS)
this.dbOptions = options.db
this.db = knex(options.db)
Expand Down Expand Up @@ -121,6 +122,12 @@ export default class Jasql {
.catch(handleDbError)
}

// _validateInitialized() {
// if (!this.initialized) {
// throw
// }
// }

_rowToDocument (row) {
if (this._isPostgres()) {
return row[this.jsonColName]
Expand Down

0 comments on commit 89b8b9b

Please sign in to comment.