Comparing version 0.2.1 to 0.2.2
@@ -1,2 +0,2 @@ | ||
// Knex.js 0.2.1 | ||
// Knex.js 0.2.2 | ||
// | ||
@@ -26,3 +26,3 @@ // (c) 2013 Tim Griesser | ||
// Keep in sync with package.json | ||
Knex.VERSION = '0.2.1'; | ||
Knex.VERSION = '0.2.2'; | ||
@@ -410,3 +410,3 @@ // Methods common to both the `Grammar` and `SchemaGrammar` interfaces, | ||
wrapTable: function(table) { | ||
if (table instanceof Raw) return table.value; | ||
if (table instanceof Raw) return table.sql; | ||
return this.wrap(table); | ||
@@ -437,3 +437,3 @@ }, | ||
if (table) { | ||
if (_.isString(table)) { | ||
if (_.isString(table) || table instanceof Raw) { | ||
this.table = table; | ||
@@ -440,0 +440,0 @@ } else { |
{ | ||
"name": "knex", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A query builder for Postgres, MySQL and SQLite3, designed to be flexible, portable, and fun to use.", | ||
@@ -5,0 +5,0 @@ "main": "knex.js", |
var _ = require('underscore'); | ||
var equal = require('assert').equal; | ||
@@ -7,3 +8,3 @@ module.exports = function(Knex, dbName, resolver) { | ||
it('should truncate a table with truncate', function(ok) { | ||
Knex('test_table_two') | ||
@@ -37,2 +38,6 @@ .truncate() | ||
it('should allow using the primary table as a raw statement', function() { | ||
equal(Knex(Knex.Raw("raw_table_name")).toString(), 'select * from raw_table_name'); | ||
}); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208792
6263