Skip to content

Commit

Permalink
Merge branch 'release-3.0.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Dec 15, 2016
2 parents e7b7e2b + e8ef3cb commit aa2466d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="3.0.12"></a>
## [3.0.12](https://github.com/adonisjs/adonis-lucid/compare/v3.0.11...v3.0.12) (2016-12-15)


### Bug Fixes

* **database:** rename pluck to pluckAll ([410f700](https://github.com/adonisjs/adonis-lucid/commit/410f700)), closes [#81](https://github.com/adonisjs/adonis-lucid/issues/81)



<a name="3.0.11"></a>
## [3.0.11](https://github.com/adonisjs/adonis-lucid/compare/v3.0.10...v3.0.11) (2016-12-12)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"directories": {
"test": "test"
},
"version": "3.0.11",
"version": "3.0.12",
"scripts": {
"lint": "standard",
"test:all": "DB=sqlite3 npm run test && DB=mysql npm run test && DB=pg npm run test",
Expand Down
4 changes: 2 additions & 2 deletions src/Database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ Database.withPrefix = function (prefix) {
return this
}

Database.pluck = function (fields) {
Database.pluckAll = function (fields) {
const args = _.isArray(fields) ? fields : _.toArray(arguments)
return this.select.apply(this, args)
}
Expand All @@ -428,7 +428,7 @@ QueryBuilder.prototype.from = Database.table
QueryBuilder.prototype.into = Database.table
QueryBuilder.prototype.withPrefix = Database.withPrefix
QueryBuilder.prototype.withoutPrefix = Database.withoutPrefix
QueryBuilder.prototype.pluck = Database.pluck
QueryBuilder.prototype.pluckAll = Database.pluckAll

/**
* Proxy handler to proxy methods and send
Expand Down
4 changes: 2 additions & 2 deletions test/unit/database.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ describe('Database provider', function () {
expect(callbackCalledForTimes).to.equal(allUsers.length)
})

it('should be able to pluck multiple fields using the pluck method', function * () {
const users = yield Database.table('users').withoutPrefix().pluck('id', 'username')
it('should be able to pluck multiple fields using the pluckAll method', function * () {
const users = yield Database.table('users').withoutPrefix().pluckAll('id', 'username')
expect(users[0]).to.have.property('id')
expect(users[0]).to.have.property('username')
})
Expand Down
4 changes: 2 additions & 2 deletions test/unit/migrations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ describe('Migrations', function () {
}
}

const migrationsB1 = {'2016-01-30_create_users_table': User}
const migrationsB2 = {'2016-01-30_create_accouts_table': Account}
const migrationsB1 = {'2016-01-30_create_accounts_table': Account}
const migrationsB2 = {'2016-01-30_create_users_table': User}
let allMigs = {}
_.merge(allMigs, migrationsB1, migrationsB2)
const Runner = new Migrations(Database, Config)
Expand Down

0 comments on commit aa2466d

Please sign in to comment.