pg_query 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/ext/pg_query/pg_query.c +16 -0
- data/lib/pg_query/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjBhM2RlMDljMjA1Njc3ZTk3MjVkYjA1MmI2NjgzYjI3NGVjMTkyOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTI0OTE1NzdjMjY0ZGJhOTUyZWQ0YzE3MjY5OTVkZmQxN2NkNmM5Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWU3OTAwMzViODE3NjZlNTE0Y2IxMzE0ODM0OTkwZmVmZjAwZDY0YWQ1ZGUw
|
10
|
+
MDBkNzEwNWIyYTQxYTYyNDU5NzZiNjU5YjUxNWE1YmVmNmM5OTFhYmRlNmE5
|
11
|
+
MzI5MGYxOTkwMGUzYjFjYTRjNDA3MzAxYWE4NzhmZTJjOWRiNzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGMxZTM4MWJkYzZmMjMyYTIyNGJhYjAzYzFhOGRmZTYwYTNlZTY0MzNmYTI3
|
14
|
+
MDQzZmUwZTJiN2I1NGU1MmVhNzI1NGY1NTVjMmQzNTA2NGFhMjExZmI2OWJh
|
15
|
+
YjVkMTJlZmIyMmM3YTUwMmIwNDk0ZjllOWE0MjBmMzY2NGY1Yjg=
|
data/ext/pg_query/pg_query.c
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
#include "utils/memutils.h"
|
3
3
|
#include "parser/parser.h"
|
4
4
|
#include "parser/scanner.h"
|
5
|
+
#include "parser/scansup.h"
|
5
6
|
#include "nodes/print.h"
|
6
7
|
#include "nodes/nodeFuncs.h"
|
7
8
|
#include "mb/pg_wchar.h"
|
@@ -238,6 +239,21 @@ fill_in_constant_lengths(pgssConstLocations *jstate, const char *query)
|
|
238
239
|
* byte after the text of the current token in scanbuf.
|
239
240
|
*/
|
240
241
|
locs[i].length = (int) strlen(yyextra.scanbuf + loc);
|
242
|
+
|
243
|
+
/* Quoted string with Unicode escapes
|
244
|
+
*
|
245
|
+
* The lexer consumes trailing whitespace in order to find UESCAPE, but if there
|
246
|
+
* is no UESCAPE it has still consumed it - don't include it in constant length.
|
247
|
+
*/
|
248
|
+
if (locs[i].length > 4 && /* U&'' */
|
249
|
+
(yyextra.scanbuf[loc] == 'u' || yyextra.scanbuf[loc] == 'U') &&
|
250
|
+
yyextra.scanbuf[loc + 1] == '&' && yyextra.scanbuf[loc + 2] == '\'')
|
251
|
+
{
|
252
|
+
int j = locs[i].length - 1; /* Skip the \0 */
|
253
|
+
for (; j >= 0 && scanner_isspace(yyextra.scanbuf[loc + j]); j--) {}
|
254
|
+
locs[i].length = j + 1; /* Count the \0 */
|
255
|
+
}
|
256
|
+
|
241
257
|
break; /* out of inner for-loop */
|
242
258
|
}
|
243
259
|
}
|
data/lib/pg_query/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Fittl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|