Permalink
Browse files

Added 'remove()' as alias for 'delete()'.

Bumped version.
  • Loading branch information...
1 parent a2d5a49 commit c0579981f2dbac11f553361971674ceb9d1c6f6b @hiddentao committed Mar 8, 2013
Showing with 11 additions and 1 deletion.
  1. +1 −1 package.json
  2. +3 −0 src/squel.coffee
  3. +7 −0 test/delete.test.coffee
View
@@ -1,7 +1,7 @@
{
"name": "squel",
"description": "SQL query string builder",
- "version": "1.0.6",
+ "version": "1.0.7",
"author": "Ramesh Nair <ram@hiddentao.com> (http://www.hiddentao.com/)",
"contributors": [
"Ramesh Nair <ram@hiddentao.com> (http://www.hiddentao.com/)",
View
@@ -683,6 +683,9 @@ _export = {
Delete
}
+# aliases
+_export.remove = _export.delete
+
module?.exports = _export
window?.squel = _export
@@ -34,13 +34,20 @@ test['DELETE builder'] =
beforeEach: ->
@inst = squel.delete()
+ 'instanceof Delete': ->
+ assert.instanceOf @inst, squel.Delete
+
'instanceof JoinWhereOrderLimit': ->
assert.instanceOf @inst, squel.JoinWhereOrderLimit
'default field values': ->
assert.same null, @inst.table
assert.same squel.DefaultQueryBuilderOptions, @inst.options
+ 'alias is "remove"': ->
+ @alias_inst = squel.remove()
+ assert.instanceOf @alias_inst, squel.Delete
+
'constructor':
'override options': ->
@inst = squel.delete

0 comments on commit c057998

Please sign in to comment.