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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWUyYWJhOTliMDExYzY1YTM0MzNiZTE0N2ZkZGRjMTgzYTViZDA1Yw==
4
+ ZjBhM2RlMDljMjA1Njc3ZTk3MjVkYjA1MmI2NjgzYjI3NGVjMTkyOA==
5
5
  data.tar.gz: !binary |-
6
- NThhNjlmNmVlMGUyZDRiYzU0MDQ0NTI1MzAyMzVlM2M4NzU0Y2IxNw==
6
+ YTI0OTE1NzdjMjY0ZGJhOTUyZWQ0YzE3MjY5OTVkZmQxN2NkNmM5Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTViMGE3YWYyNjg0NGViZjY4ZDUyYTgxNjdjNzY0ZDZjOTgyZjEwYmQwZmM0
10
- YmM4NDBhY2VjOWYzMzgyOGM0YzNlNzljZGU2OWJmZjU1OWM3NmJjOWFhOGIw
11
- ZTFhMjNhYjA0ZDczYWFiNmIzOGQ0YmIyZWZmMTVmNDA5MjY3Nzg=
9
+ OWU3OTAwMzViODE3NjZlNTE0Y2IxMzE0ODM0OTkwZmVmZjAwZDY0YWQ1ZGUw
10
+ MDBkNzEwNWIyYTQxYTYyNDU5NzZiNjU5YjUxNWE1YmVmNmM5OTFhYmRlNmE5
11
+ MzI5MGYxOTkwMGUzYjFjYTRjNDA3MzAxYWE4NzhmZTJjOWRiNzY=
12
12
  data.tar.gz: !binary |-
13
- MTg5YzMxN2I2NWIxMGIwY2M1MTY1OTMzMmY2Y2I5NzEyZmU5YmJhYWY4ZjIx
14
- MTYxNWJmZjMwMzM4YjE2N2Q4NTgzOWY4MDQwMjBmZGZiYjFmODZhMjc5NzZh
15
- ZGRmOTIwZmVhZDBhNzAzYmFlYjMyNTFkMWRmY2ViMGEzZDA1NTY=
13
+ OGMxZTM4MWJkYzZmMjMyYTIyNGJhYjAzYzFhOGRmZTYwYTNlZTY0MzNmYTI3
14
+ MDQzZmUwZTJiN2I1NGU1MmVhNzI1NGY1NTVjMmQzNTA2NGFhMjExZmI2OWJh
15
+ YjVkMTJlZmIyMmM3YTUwMmIwNDk0ZjllOWE0MjBmMzY2NGY1Yjg=
@@ -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
  }
@@ -1,3 +1,3 @@
1
1
  class PgQuery
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
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.3
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-21 00:00:00.000000000 Z
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler