diff --git a/.travis.yml b/.travis.yml index e2641fa..776f8ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ node_js: - "0.12" - "4" - "5" + - "10" + - "12" addons: apt: sources: diff --git a/README.md b/README.md index 8450f84..cb5acb5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ All credit for the hard problems goes to [Lukas Fittl](https://github.com/lfittl ## How to re-buid ```sh -git clone -b 10-latest git://github.com/lfittl/libpg_query +git clone -b 12-latest-develop git://github.com/lfittl/libpg_query cd libpg_query make ``` diff --git a/libpg_query/include/pg_query.h b/libpg_query/include/pg_query.h index 6745cb8..d638065 100644 --- a/libpg_query/include/pg_query.h +++ b/libpg_query/include/pg_query.h @@ -10,6 +10,13 @@ typedef struct { char* context; // additional context (optional, can be NULL) } PgQueryError; +typedef struct { + void* pbuf; + unsigned int pbuf_len; + char* stderr_buffer; + PgQueryError* error; +} PgQueryScanResult; + typedef struct { char* parse_tree; char* stderr_buffer; @@ -37,20 +44,22 @@ extern "C" { #endif PgQueryNormalizeResult pg_query_normalize(const char* input); +PgQueryScanResult pg_query_scan(const char* input); PgQueryParseResult pg_query_parse(const char* input); PgQueryPlpgsqlParseResult pg_query_parse_plpgsql(const char* input); PgQueryFingerprintResult pg_query_fingerprint(const char* input); void pg_query_free_normalize_result(PgQueryNormalizeResult result); +void pg_query_free_scan_result(PgQueryScanResult result); void pg_query_free_parse_result(PgQueryParseResult result); void pg_query_free_plpgsql_parse_result(PgQueryPlpgsqlParseResult result); void pg_query_free_fingerprint_result(PgQueryFingerprintResult result); // Postgres version information -#define PG_VERSION "10.0" -#define PG_MAJORVERSION "10" -#define PG_VERSION_NUM 100000 +#define PG_VERSION "12.3" +#define PG_MAJORVERSION "12" +#define PG_VERSION_NUM 120003 // Deprecated APIs below diff --git a/libpg_query/linux/libpg_query.a b/libpg_query/linux/libpg_query.a index 182ae70..be34edf 100644 Binary files a/libpg_query/linux/libpg_query.a and b/libpg_query/linux/libpg_query.a differ diff --git a/libpg_query/osx/libpg_query.a b/libpg_query/osx/libpg_query.a index 7067b42..be34edf 100644 Binary files a/libpg_query/osx/libpg_query.a and b/libpg_query/osx/libpg_query.a differ diff --git a/package.json b/package.json index 30beb35..1a8fc7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pg-query-native", - "version": "1.1.0", + "version": "1.1.0-v12", "description": "The real PostgreSQL query parser", "homepage": "http://github.com/zhm/node-pg-query-native", "main": "index.js", @@ -10,11 +10,11 @@ "rebuild": "./node_modules/node-gyp/bin/node-gyp.js configure rebuild", "test": "mocha" }, - "author": "Zac McCormick (http://github.com/zhm)", + "author": "Dan Lynch (http://github.com/pyramation)", "license": "BSD", "repository": { "type": "git", - "url": "git://github.com/zhm/node-pg-query-native.git" + "url": "git://github.com/pyramation/node-pg-query-native.git" }, "devDependencies": { "mocha": "^2.5.3"