@@ -114,20 +114,46 @@ Harness.test({
114
114
query : post . select ( post . id ) . where ( post . content . equals ( new Buffer ( 'test' ) ) ) ,
115
115
pg : {
116
116
text : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = $1)' ,
117
- string : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = \'\\x74657374\')' ,
117
+ string : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = \'\\x74657374\')'
118
118
} ,
119
119
sqlite : {
120
120
text : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = $1)' ,
121
- string : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = x\'74657374\')' ,
121
+ string : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = x\'74657374\')'
122
122
} ,
123
123
mysql : {
124
124
text : 'SELECT `post`.`id` FROM `post` WHERE (`post`.`content` = ?)' ,
125
- string : 'SELECT `post`.`id` FROM `post` WHERE (`post`.`content` = x\'74657374\')' ,
125
+ string : 'SELECT `post`.`id` FROM `post` WHERE (`post`.`content` = x\'74657374\')'
126
126
} ,
127
127
oracle : {
128
128
text : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = :1)' ,
129
- string : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = utl_raw.cast_to_varchar2(hextoraw(\'74657374\')))' ,
129
+ string : 'SELECT "post"."id" FROM "post" WHERE ("post"."content" = utl_raw.cast_to_varchar2(hextoraw(\'74657374\')))'
130
130
} ,
131
131
params : [ new Buffer ( 'test' ) ]
132
132
} ) ;
133
133
134
+ // concat tests
135
+ Harness . test ( {
136
+ query : post . select ( post . content . concat ( post . tags ) ) ,
137
+ pg : {
138
+ text : 'SELECT ("post"."content" || "post"."tags") FROM "post"' ,
139
+ string : 'SELECT ("post"."content" || "post"."tags") FROM "post"'
140
+ } ,
141
+ sqlite : {
142
+ text : 'SELECT ("post"."content" || "post"."tags") FROM "post"' ,
143
+ string : 'SELECT ("post"."content" || "post"."tags") FROM "post"'
144
+ } ,
145
+ mysql : {
146
+ text : 'SELECT (`post`.`content` || `post`.`tags`) FROM `post`' ,
147
+ string : 'SELECT (`post`.`content` || `post`.`tags`) FROM `post`'
148
+ } ,
149
+ mssql : {
150
+ text : 'SELECT ([post].[content] + [post].[tags]) FROM [post]' ,
151
+ string : 'SELECT ([post].[content] + [post].[tags]) FROM [post]'
152
+ } ,
153
+ oracle : {
154
+ text : 'SELECT ("post"."content" || "post"."tags") FROM "post"' ,
155
+ string : 'SELECT ("post"."content" || "post"."tags") FROM "post"'
156
+ } ,
157
+ params : [ ]
158
+ } ) ;
159
+
0 commit comments