Skip to content

Commit

Permalink
Verify raw statements work in select fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Peterson authored and Eric Peterson committed Dec 6, 2016
1 parent 971489e commit 9907bab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/specs/Query/Builder+GrammarSpec.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ component extends="testbox.system.BaseSpec" {
"SELECT ""x"".""y"" AS ""foo.bar"" FROM ""public"".""users"""
);
} );

it( "selects raw values correctly", function() {
var builder = getBuilder();
builder.select( builder.raw( "substr( foo, 6 )" ) ).from( "users" );
expect( builder.toSql() ).toBe(
"SELECT substr( foo, 6 ) FROM ""users"""
);
} );
} );

describe( "using table prefixes", function() {
Expand Down

0 comments on commit 9907bab

Please sign in to comment.