From cacaafd05b6549bfed0cadcdec3b1e9a4416b968 Mon Sep 17 00:00:00 2001 From: ChengLei Shao Date: Fri, 8 Mar 2024 09:21:27 +0800 Subject: [PATCH 01/19] fix: parse association field in acl (#3655) --- packages/core/acl/src/acl.ts | 23 ++- .../src/server/__tests__/users.test.ts | 131 ++++++++++++++++++ 2 files changed, 153 insertions(+), 1 deletion(-) diff --git a/packages/core/acl/src/acl.ts b/packages/core/acl/src/acl.ts index 6f08a98ef..d7ed1ab73 100644 --- a/packages/core/acl/src/acl.ts +++ b/packages/core/acl/src/acl.ts @@ -264,7 +264,7 @@ export class ACL extends EventEmitter { ctx: { state, }, - $user: async () => state.currentUser, + $user: getUser(ctx), $nRole: () => state.currentRole, }, }); @@ -388,3 +388,24 @@ export class ACL extends EventEmitter { return this.availableActions.has(this.resolveActionAlias(actionName)); } } + +function getUser(ctx) { + return async ({ fields }) => { + const userFields = fields.filter((f) => f && ctx.db.getFieldByPath('users.' + f)); + ctx.logger?.info('filter-parse: ', { userFields }); + if (!ctx.state.currentUser) { + return; + } + if (!userFields.length) { + return; + } + const user = await ctx.db.getRepository('users').findOne({ + filterByTk: ctx.state.currentUser.id, + fields: userFields, + }); + ctx.logger?.info('filter-parse: ', { + $user: user?.toJSON(), + }); + return user; + }; +} diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts index 527fbfc1c..e8ab3dbbf 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/__tests__/users.test.ts @@ -34,6 +34,137 @@ describe('actions', () => { await app.destroy(); }); + it('should set scope with user associations', async () => { + await app.db.getCollection('collections').repository.create({ + values: { + name: 'sites', + autoGenId: false, + fields: [ + { + name: 'id', + type: 'bigInt', + primaryKey: true, + autoIncrement: true, + }, + { + type: 'string', + name: 'name', + }, + ], + }, + context: {}, + }); + + // create site + const site = await db.getRepository('sites').create({ + values: { + name: 'testSite', + }, + }); + + const site2 = await db.getRepository('sites').create({ + values: { + name: 'site2', + }, + }); + + await app.db.getCollection('fields').repository.create({ + values: { + collectionName: 'users', + name: 'site', + type: 'belongsTo', + foreignKey: 'siteId', + targetKey: 'id', + }, + context: {}, + }); + + const testUser = await db.getRepository('users').create({ + values: { + username: 'testUser', + site: site.get('id'), + }, + }); + + await db.getRepository('roles').create({ + values: { + name: 'testRole', + users: [ + { + id: testUser.get('id'), + }, + ], + }, + }); + + await app.db.getCollection('collections').repository.create({ + values: { + name: 'items', + fields: [ + { + type: 'string', + name: 'name', + }, + { + name: 'site', + type: 'belongsTo', + foreignKey: 'siteId', + targetKey: 'id', + }, + ], + }, + context: {}, + }); + + const scope = await app.db.getCollection('dataSourcesRolesResourcesScopes').repository.create({ + values: { + name: 'items-own-site', + actions: ['view'], + fields: ['name'], + scope: { $and: [{ site: { id: { $eq: '{{$user.site.id}}' } } }] }, + resourceName: 'items', + }, + }); + + // create acl resource + const createResourcesResp = await adminAgent.resource('roles.resources', 'testRole').create({ + values: { + name: 'items', + usingActionsConfig: true, + actions: [ + { + name: 'view', + scope: scope.get('id'), + }, + ], + }, + }); + + expect(createResourcesResp.status).toBe(200); + + const item = await db.getRepository('items').create({ + values: { + name: 'testItem', + site: site.get('id'), + }, + }); + + await db.getRepository('items').create({ + values: { + name: 'item2', + site: site2.get('id'), + }, + }); + + // list with user + const userAgent: any = app.agent().login(testUser).set('x-role', 'testRole'); + + const listResp = await userAgent.resource('items').list({}); + expect(listResp.status).toBe(200); + const data = listResp.body.data; + expect(data.length).toBe(1); + }); + it('update profile with roles', async () => { const res2 = await adminAgent.resource('users').updateProfile({ filterByTk: adminUser.id, From 108875600c4baf9824246c43bcbdd858876e5fd1 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Fri, 8 Mar 2024 10:12:24 +0800 Subject: [PATCH 02/19] chore: update yarn.lock --- yarn.lock | 139 ++++-------------------------------------------------- 1 file changed, 9 insertions(+), 130 deletions(-) diff --git a/yarn.lock b/yarn.lock index 486e00c98..5110e39b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4507,15 +4507,6 @@ dependencies: "@opentelemetry/semantic-conventions" "1.19.0" -"@opentelemetry/exporter-prometheus@^0.46.0": - version "0.46.0" - resolved "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.46.0.tgz#c411a1e8a5266f9f3ddc44a088a538c3c1ee4830" - integrity sha512-AXcoCHG31K2PLGizlJJWcfQqZsGfUZkT7ik6C8VJu7U2Cenk0Xhvd3rO+vVNSSjP1+LHkP4MQtqEXpIZttw5cw== - dependencies: - "@opentelemetry/core" "1.19.0" - "@opentelemetry/resources" "1.19.0" - "@opentelemetry/sdk-metrics" "1.19.0" - "@opentelemetry/instrumentation@^0.46.0": version "0.46.0" resolved "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.46.0.tgz#a8a252306f82e2eace489312798592a14eb9830e" @@ -4549,7 +4540,7 @@ "@opentelemetry/core" "1.19.0" "@opentelemetry/semantic-conventions" "1.19.0" -"@opentelemetry/sdk-metrics@1.19.0", "@opentelemetry/sdk-metrics@^1.19.0": +"@opentelemetry/sdk-metrics@^1.19.0": version "1.19.0" resolved "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.19.0.tgz#fe8029af29402563eb8dba75a85fc02006ea92c4" integrity sha512-FiMii40zr0Fmys4F1i8gmuCvbinBnBsDeGBr4FQemOf0iPCLytYQm5AZJ/nn4xSc71IgKBQwTFQRAGJI7JvZ4Q== @@ -6439,15 +6430,6 @@ dependencies: "@types/express" "*" -"@types/pg@^8.10.9": - version "8.11.2" - resolved "https://registry.npmjs.org/@types/pg/-/pg-8.11.2.tgz#e5c306601d2e0cc54c0801cc61a41761c8a95c92" - integrity sha512-G2Mjygf2jFMU/9hCaTYxJrwdObdcnuQde1gndooZSOHsNSaCehAuwc7EIuSA34Do8Jx2yZ19KtvW8P0j4EuUXw== - dependencies: - "@types/node" "*" - pg-protocol "*" - pg-types "^4.0.1" - "@types/picomatch@*": version "2.3.3" resolved "https://registry.npmmirror.com/@types/picomatch/-/picomatch-2.3.3.tgz#be60498568c19e989e43fb39aa84be1ed3655e92" @@ -8587,7 +8569,7 @@ bessel@^1.0.2: resolved "https://registry.npmmirror.com/bessel/-/bessel-1.0.2.tgz#828812291e0b62e94959cdea43fac186e8a7202d" integrity sha512-Al3nHGQGqDYqqinXhQzmwmcRToe/3WyBv4N8aZc5Pef8xw2neZlR9VPi84Sa23JtgWcucu18HxVZrnI0fn2etw== -big-integer@^1.6.44, big-integer@^1.6.48: +big-integer@^1.6.44: version "1.6.52" resolved "https://registry.npmmirror.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== @@ -11393,7 +11375,7 @@ delegates@^1.0.0: resolved "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -denque@^2.0.1, denque@^2.1.0: +denque@^2.0.1: version "2.1.0" resolved "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== @@ -15934,11 +15916,6 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jmespath@^0.16.0: - version "0.16.0" - resolved "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076" - integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw== - jose@^4.15.1: version "4.15.4" resolved "https://registry.npmmirror.com/jose/-/jose-4.15.4.tgz#02a9a763803e3872cf55f29ecef0dfdcc218cc03" @@ -16128,11 +16105,6 @@ json5@^2.1.2, json5@^2.2.2, json5@^2.2.3: resolved "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonata@^2.0.3: - version "2.0.4" - resolved "https://registry.npmjs.org/jsonata/-/jsonata-2.0.4.tgz#d8575d4c7695a2086162a2baebce0f0ee4e84fdb" - integrity sha512-vfavX4/G/yrYxE+UrmT/oUJ3ph7KqUrb0R7b0LVRcntQwxw+Z5kA1pNUIQzX5hF04Oe1eKxyoIPsmXtc2LgJTQ== - jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" @@ -16166,11 +16138,6 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.npmmirror.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonpath-plus@^7.2.0: - version "7.2.0" - resolved "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899" - integrity sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA== - jsonwebtoken@^8.5.1: version "8.5.1" resolved "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" @@ -16942,7 +16909,7 @@ long@^4.0.0: resolved "https://registry.npmmirror.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -long@^5.2.0, long@^5.2.1: +long@^5.2.0: version "5.2.3" resolved "https://registry.npmmirror.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== @@ -16988,7 +16955,7 @@ lowercase-keys@^2.0.0: resolved "https://registry.npmmirror.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@8.0.5, lru-cache@^8.0.0: +lru-cache@8.0.5: version "8.0.5" resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-8.0.5.tgz#983fe337f3e176667f8e567cfcce7cb064ea214e" integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== @@ -18362,20 +18329,6 @@ mysql2@^2.3.3: seq-queue "^0.0.5" sqlstring "^2.3.2" -mysql2@^3.9.1: - version "3.9.2" - resolved "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz#567343581f9742032598b6c15bd7aa65d2f7d4af" - integrity sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw== - dependencies: - denque "^2.1.0" - generate-function "^2.3.1" - iconv-lite "^0.6.3" - long "^5.2.1" - lru-cache "^8.0.0" - named-placeholders "^1.1.3" - seq-queue "^0.0.5" - sqlstring "^2.3.2" - mz@^2.7.0: version "2.7.0" resolved "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -18385,7 +18338,7 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -named-placeholders@^1.1.2, named-placeholders@^1.1.3: +named-placeholders@^1.1.2: version "1.1.3" resolved "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351" integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== @@ -18617,13 +18570,6 @@ node-releases@^2.0.14: resolved "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== -node-sql-parser@^4.11.0: - version "4.18.0" - resolved "https://registry.npmjs.org/node-sql-parser/-/node-sql-parser-4.18.0.tgz#516b6e633c55c5abbba1ca588ab372db81ae9318" - integrity sha512-2YEOR5qlI1zUFbGMLKNfsrR5JUvFg9LxIRVE+xJe962pfVLH0rnItqLzv96XVs1Y1UIR8FxsXAuvX/lYAWZ2BQ== - dependencies: - big-integer "^1.6.48" - node-xlsx@^0.16.1: version "0.16.2" resolved "https://registry.npmmirror.com/node-xlsx/-/node-xlsx-0.16.2.tgz#40f580187eae0e032cac96e958e97cb6ceca09f6" @@ -19087,7 +19033,7 @@ object.values@^1.1.6, object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -obuf@^1.0.0, obuf@^1.1.2, obuf@~1.1.2: +obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.npmmirror.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== @@ -19916,17 +19862,12 @@ pg-int8@1.0.1: resolved "https://registry.npmmirror.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-numeric@1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz#816d9a44026086ae8ae74839acd6a09b0636aa3a" - integrity sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw== - pg-pool@^3.6.1: version "3.6.1" resolved "https://registry.npmmirror.com/pg-pool/-/pg-pool-3.6.1.tgz#5a902eda79a8d7e3c928b77abf776b3cb7d351f7" integrity sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og== -pg-protocol@*, pg-protocol@^1.6.0: +pg-protocol@^1.6.0: version "1.6.0" resolved "https://registry.npmmirror.com/pg-protocol/-/pg-protocol-1.6.0.tgz#4c91613c0315349363af2084608db843502f8833" integrity sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q== @@ -19942,20 +19883,7 @@ pg-types@^2.1.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg-types@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz#399209a57c326f162461faa870145bb0f918b76d" - integrity sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng== - dependencies: - pg-int8 "1.0.1" - pg-numeric "1.0.2" - postgres-array "~3.0.1" - postgres-bytea "~3.0.0" - postgres-date "~2.1.0" - postgres-interval "^3.0.0" - postgres-range "^1.1.1" - -pg@^8.11.3, pg@^8.7.3: +pg@^8.7.3: version "8.11.3" resolved "https://registry.npmmirror.com/pg/-/pg-8.11.3.tgz#d7db6e3fe268fcedd65b8e4599cda0b8b4bf76cb" integrity sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g== @@ -20553,33 +20481,16 @@ postgres-array@~2.0.0: resolved "https://registry.npmmirror.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== -postgres-array@~3.0.1: - version "3.0.2" - resolved "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz#68d6182cb0f7f152a7e60dc6a6889ed74b0a5f98" - integrity sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog== - postgres-bytea@~1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== -postgres-bytea@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz#9048dc461ac7ba70a6a42d109221619ecd1cb089" - integrity sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw== - dependencies: - obuf "~1.1.2" - postgres-date@~1.0.4: version "1.0.7" resolved "https://registry.npmmirror.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== -postgres-date@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz#b85d3c1fb6fb3c6c8db1e9942a13a3bf625189d0" - integrity sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA== - postgres-interval@^1.1.0: version "1.2.0" resolved "https://registry.npmmirror.com/postgres-interval/-/postgres-interval-1.2.0.tgz#b460c82cb1587507788819a06aa0fffdb3544695" @@ -20587,16 +20498,6 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" -postgres-interval@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz#baf7a8b3ebab19b7f38f07566c7aab0962f0c86a" - integrity sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw== - -postgres-range@^1.1.1: - version "1.1.4" - resolved "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" - integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -22865,28 +22766,6 @@ sequelize@^6.26.0: validator "^13.9.0" wkx "^0.5.0" -sequelize@^6.35.0: - version "6.37.1" - resolved "https://registry.npmjs.org/sequelize/-/sequelize-6.37.1.tgz#9380fe0a3b5ff17638d3fce30c3cf3a2396c2343" - integrity sha512-vIKKzQ9dGp2aBOxQRD1FmUYViuQiKXSJ8yah8TsaBx4U3BokJt+Y2A0qz2C4pj08uX59qpWxRqSLEfRmVOEgQw== - dependencies: - "@types/debug" "^4.1.8" - "@types/validator" "^13.7.17" - debug "^4.3.4" - dottie "^2.0.6" - inflection "^1.13.4" - lodash "^4.17.21" - moment "^2.29.4" - moment-timezone "^0.5.43" - pg-connection-string "^2.6.1" - retry-as-promised "^7.0.4" - semver "^7.5.4" - sequelize-pool "^7.1.0" - toposort-class "^1.0.1" - uuid "^8.3.2" - validator "^13.9.0" - wkx "^0.5.0" - serve-handler@6.1.3: version "6.1.3" resolved "https://registry.npmmirror.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" From 8b4821e2df39958f7befa9aa0abd203cd162bace Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 8 Mar 2024 10:23:26 +0800 Subject: [PATCH 03/19] =?UTF-8?q?chore(versions):=20=F0=9F=98=8A=20publish?= =?UTF-8?q?=20v0.20.0-alpha.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lerna.json | 2 +- packages/core/acl/package.json | 6 +- packages/core/actions/package.json | 8 +- packages/core/app/package.json | 10 +- packages/core/auth/package.json | 12 +- packages/core/build/package.json | 2 +- packages/core/cache/package.json | 2 +- packages/core/cli/package.json | 6 +- packages/core/client/package.json | 8 +- .../core/create-nocobase-app/package.json | 2 +- .../core/data-source-manager/package.json | 12 +- packages/core/database/package.json | 6 +- packages/core/devtools/package.json | 8 +- packages/core/evaluators/package.json | 4 +- packages/core/logger/package.json | 2 +- packages/core/resourcer/package.json | 4 +- packages/core/sdk/package.json | 2 +- packages/core/server/package.json | 26 ++-- packages/core/telemetry/package.json | 4 +- packages/core/test/package.json | 4 +- packages/core/utils/package.json | 2 +- .../plugins/@nocobase/plugin-acl/package.json | 2 +- .../plugin-action-bulk-edit/package.json | 2 +- .../plugin-action-bulk-update/package.json | 2 +- .../plugin-action-duplicate/package.json | 2 +- .../plugin-action-print/package.json | 2 +- .../@nocobase/plugin-api-doc/package.json | 2 +- .../@nocobase/plugin-api-keys/package.json | 2 +- .../@nocobase/plugin-audit-logs/package.json | 2 +- .../@nocobase/plugin-auth/package.json | 2 +- .../plugin-backup-restore/package.json | 2 +- .../@nocobase/plugin-calendar/package.json | 2 +- .../plugins/@nocobase/plugin-cas/package.json | 2 +- .../@nocobase/plugin-charts/package.json | 2 +- .../plugin-china-region/package.json | 2 +- .../@nocobase/plugin-client/package.json | 2 +- .../plugin-collection-manager/package.json | 2 +- .../plugin-custom-request/package.json | 2 +- .../plugin-data-source-manager/package.json | 2 +- .../plugin-data-visualization/package.json | 2 +- .../plugin-disable-pm-add/package.json | 2 +- .../plugin-error-handler/package.json | 2 +- .../plugin-excel-formula-field/package.json | 2 +- .../@nocobase/plugin-export/package.json | 2 +- .../plugin-file-manager/package.json | 2 +- .../plugin-formula-field/package.json | 2 +- .../@nocobase/plugin-gantt/package.json | 2 +- .../package.json | 2 +- .../plugin-iframe-block/package.json | 2 +- .../@nocobase/plugin-import/package.json | 2 +- .../@nocobase/plugin-kanban/package.json | 2 +- .../package.json | 2 +- .../@nocobase/plugin-logger/package.json | 2 +- .../plugins/@nocobase/plugin-map/package.json | 2 +- .../plugin-math-formula-field/package.json | 2 +- .../plugin-mobile-client/package.json | 2 +- .../plugin-mock-collections/package.json | 2 +- .../plugin-multi-app-manager/package.json | 2 +- .../package.json | 2 +- .../plugin-notifications/package.json | 2 +- .../@nocobase/plugin-oidc/package.json | 2 +- .../@nocobase/plugin-saml/package.json | 2 +- .../plugin-sample-hello/package.json | 2 +- .../plugin-sequence-field/package.json | 2 +- .../@nocobase/plugin-sms-auth/package.json | 2 +- .../plugin-snapshot-field/package.json | 2 +- .../plugin-system-settings/package.json | 2 +- .../plugin-theme-editor/package.json | 2 +- .../plugin-ui-routes-storage/package.json | 2 +- .../plugin-ui-schema-storage/package.json | 2 +- .../@nocobase/plugin-users/package.json | 2 +- .../plugin-verification/package.json | 2 +- .../package.json | 2 +- .../plugin-workflow-aggregate/package.json | 2 +- .../plugin-workflow-delay/package.json | 2 +- .../package.json | 2 +- .../plugin-workflow-loop/package.json | 2 +- .../plugin-workflow-manual/package.json | 2 +- .../plugin-workflow-parallel/package.json | 2 +- .../plugin-workflow-request/package.json | 2 +- .../plugin-workflow-sql/package.json | 2 +- .../plugin-workflow-test/package.json | 2 +- .../@nocobase/plugin-workflow/package.json | 4 +- packages/presets/nocobase/package.json | 114 +++++++++--------- 84 files changed, 186 insertions(+), 186 deletions(-) diff --git a/lerna.json b/lerna.json index b6e175a68..07e365c53 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "npmClient": "yarn", "useWorkspaces": true, "npmClientArgs": ["--ignore-engines"], diff --git a/packages/core/acl/package.json b/packages/core/acl/package.json index 463bd2584..1c83ea64c 100644 --- a/packages/core/acl/package.json +++ b/packages/core/acl/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/acl", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/resourcer": "0.20.0-alpha.5", - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/resourcer": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.6", "minimatch": "^5.1.1" }, "repository": { diff --git a/packages/core/actions/package.json b/packages/core/actions/package.json index b06b64b64..7ef2f74fc 100644 --- a/packages/core/actions/package.json +++ b/packages/core/actions/package.json @@ -1,14 +1,14 @@ { "name": "@nocobase/actions", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/cache": "0.20.0-alpha.5", - "@nocobase/database": "0.20.0-alpha.5", - "@nocobase/resourcer": "0.20.0-alpha.5" + "@nocobase/cache": "0.20.0-alpha.6", + "@nocobase/database": "0.20.0-alpha.6", + "@nocobase/resourcer": "0.20.0-alpha.6" }, "repository": { "type": "git", diff --git a/packages/core/app/package.json b/packages/core/app/package.json index a86acaa98..c59f0e319 100644 --- a/packages/core/app/package.json +++ b/packages/core/app/package.json @@ -1,17 +1,17 @@ { "name": "@nocobase/app", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/database": "0.20.0-alpha.5", - "@nocobase/preset-nocobase": "0.20.0-alpha.5", - "@nocobase/server": "0.20.0-alpha.5" + "@nocobase/database": "0.20.0-alpha.6", + "@nocobase/preset-nocobase": "0.20.0-alpha.6", + "@nocobase/server": "0.20.0-alpha.6" }, "devDependencies": { - "@nocobase/client": "0.20.0-alpha.5" + "@nocobase/client": "0.20.0-alpha.6" }, "repository": { "type": "git", diff --git a/packages/core/auth/package.json b/packages/core/auth/package.json index 696c7b24a..1dcd54b86 100644 --- a/packages/core/auth/package.json +++ b/packages/core/auth/package.json @@ -1,16 +1,16 @@ { "name": "@nocobase/auth", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/actions": "0.20.0-alpha.5", - "@nocobase/cache": "0.20.0-alpha.5", - "@nocobase/database": "0.20.0-alpha.5", - "@nocobase/resourcer": "0.20.0-alpha.5", - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/actions": "0.20.0-alpha.6", + "@nocobase/cache": "0.20.0-alpha.6", + "@nocobase/database": "0.20.0-alpha.6", + "@nocobase/resourcer": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.6", "@types/jsonwebtoken": "^8.5.8", "jsonwebtoken": "^8.5.1" }, diff --git a/packages/core/build/package.json b/packages/core/build/package.json index 6449bbe59..866f7b6b5 100755 --- a/packages/core/build/package.json +++ b/packages/core/build/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/build", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "Library build tool based on rollup.", "main": "lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/core/cache/package.json b/packages/core/cache/package.json index 87987c796..c233d7f84 100644 --- a/packages/core/cache/package.json +++ b/packages/core/cache/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/cache", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", diff --git a/packages/core/cli/package.json b/packages/core/cli/package.json index 0784d5ddb..665e06859 100644 --- a/packages/core/cli/package.json +++ b/packages/core/cli/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/cli", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "Apache-2.0", "main": "./src/index.js", @@ -8,7 +8,7 @@ "nocobase": "./bin/index.js" }, "dependencies": { - "@nocobase/app": "0.20.0-alpha.5", + "@nocobase/app": "0.20.0-alpha.6", "@types/fs-extra": "^11.0.1", "@umijs/utils": "3.5.20", "chalk": "^4.1.1", @@ -25,7 +25,7 @@ "tsx": "^4.6.2" }, "devDependencies": { - "@nocobase/devtools": "0.20.0-alpha.5" + "@nocobase/devtools": "0.20.0-alpha.6" }, "repository": { "type": "git", diff --git a/packages/core/client/package.json b/packages/core/client/package.json index d5f204745..107a34bfc 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/client", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.mjs", @@ -26,9 +26,9 @@ "@formily/reactive-react": "^2.2.27", "@formily/shared": "^2.2.27", "@formily/validator": "^2.2.27", - "@nocobase/evaluators": "0.20.0-alpha.5", - "@nocobase/sdk": "0.20.0-alpha.5", - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/evaluators": "0.20.0-alpha.6", + "@nocobase/sdk": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.6", "ahooks": "^3.7.2", "antd": "^5.12.8", "antd-style": "3.4.5", diff --git a/packages/core/create-nocobase-app/package.json b/packages/core/create-nocobase-app/package.json index 4029c254e..3d1bc6f18 100755 --- a/packages/core/create-nocobase-app/package.json +++ b/packages/core/create-nocobase-app/package.json @@ -1,6 +1,6 @@ { "name": "create-nocobase-app", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "src/index.js", "license": "Apache-2.0", "dependencies": { diff --git a/packages/core/data-source-manager/package.json b/packages/core/data-source-manager/package.json index b960a42d4..698d49ef8 100644 --- a/packages/core/data-source-manager/package.json +++ b/packages/core/data-source-manager/package.json @@ -1,16 +1,16 @@ { "name": "@nocobase/data-source-manager", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/actions": "0.20.0-alpha.5", - "@nocobase/cache": "0.20.0-alpha.5", - "@nocobase/database": "0.20.0-alpha.5", - "@nocobase/resourcer": "0.20.0-alpha.5", - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/actions": "0.20.0-alpha.6", + "@nocobase/cache": "0.20.0-alpha.6", + "@nocobase/database": "0.20.0-alpha.6", + "@nocobase/resourcer": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.6", "@types/jsonwebtoken": "^8.5.8", "jsonwebtoken": "^8.5.1" }, diff --git a/packages/core/database/package.json b/packages/core/database/package.json index eeb09d476..88bd19dd6 100644 --- a/packages/core/database/package.json +++ b/packages/core/database/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/database", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", "dependencies": { - "@nocobase/logger": "0.20.0-alpha.5", - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/logger": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.6", "async-mutex": "^0.3.2", "chalk": "^4.1.1", "cron-parser": "4.4.0", diff --git a/packages/core/devtools/package.json b/packages/core/devtools/package.json index f910e5962..ae8889480 100644 --- a/packages/core/devtools/package.json +++ b/packages/core/devtools/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/devtools", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "Apache-2.0", "main": "./src/index.js", "dependencies": { - "@nocobase/build": "0.20.0-alpha.5", - "@nocobase/client": "0.20.0-alpha.5", - "@nocobase/test": "0.20.0-alpha.5", + "@nocobase/build": "0.20.0-alpha.6", + "@nocobase/client": "0.20.0-alpha.6", + "@nocobase/test": "0.20.0-alpha.6", "@types/koa": "^2.13.4", "@types/koa-bodyparser": "^4.3.4", "@types/lodash": "^4.14.177", diff --git a/packages/core/evaluators/package.json b/packages/core/evaluators/package.json index 63acbdc6c..c57c58221 100644 --- a/packages/core/evaluators/package.json +++ b/packages/core/evaluators/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/evaluators", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", "dependencies": { "@formulajs/formulajs": "4.2.0", - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/utils": "0.20.0-alpha.6", "mathjs": "^10.6.0" }, "repository": { diff --git a/packages/core/logger/package.json b/packages/core/logger/package.json index ae9a389a8..eb2df74ab 100644 --- a/packages/core/logger/package.json +++ b/packages/core/logger/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/logger", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "nocobase logging library", "license": "Apache-2.0", "main": "./lib/index.js", diff --git a/packages/core/resourcer/package.json b/packages/core/resourcer/package.json index fb4bcf6ec..fa4d8f939 100644 --- a/packages/core/resourcer/package.json +++ b/packages/core/resourcer/package.json @@ -1,12 +1,12 @@ { "name": "@nocobase/resourcer", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", "dependencies": { - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/utils": "0.20.0-alpha.6", "deepmerge": "^4.2.2", "koa-compose": "^4.1.0", "lodash": "^4.17.21", diff --git a/packages/core/sdk/package.json b/packages/core/sdk/package.json index 7d53e846d..79b3c7407 100644 --- a/packages/core/sdk/package.json +++ b/packages/core/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/sdk", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "Apache-2.0", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/core/server/package.json b/packages/core/server/package.json index 630b2cbc2..3c73bbb77 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/server", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", @@ -10,18 +10,18 @@ "@koa/cors": "^3.1.0", "@koa/multer": "^3.0.2", "@koa/router": "^9.4.0", - "@nocobase/acl": "0.20.0-alpha.5", - "@nocobase/actions": "0.20.0-alpha.5", - "@nocobase/auth": "0.20.0-alpha.5", - "@nocobase/cache": "0.20.0-alpha.5", - "@nocobase/data-source-manager": "0.20.0-alpha.5", - "@nocobase/database": "0.20.0-alpha.5", - "@nocobase/evaluators": "0.20.0-alpha.5", - "@nocobase/logger": "0.20.0-alpha.5", - "@nocobase/resourcer": "0.20.0-alpha.5", - "@nocobase/sdk": "0.20.0-alpha.5", - "@nocobase/telemetry": "0.20.0-alpha.5", - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/acl": "0.20.0-alpha.6", + "@nocobase/actions": "0.20.0-alpha.6", + "@nocobase/auth": "0.20.0-alpha.6", + "@nocobase/cache": "0.20.0-alpha.6", + "@nocobase/data-source-manager": "0.20.0-alpha.6", + "@nocobase/database": "0.20.0-alpha.6", + "@nocobase/evaluators": "0.20.0-alpha.6", + "@nocobase/logger": "0.20.0-alpha.6", + "@nocobase/resourcer": "0.20.0-alpha.6", + "@nocobase/sdk": "0.20.0-alpha.6", + "@nocobase/telemetry": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.6", "@types/decompress": "4.2.4", "@types/ini": "^1.3.31", "@types/koa-send": "^4.1.3", diff --git a/packages/core/telemetry/package.json b/packages/core/telemetry/package.json index bd6a02df5..a4f8d3867 100644 --- a/packages/core/telemetry/package.json +++ b/packages/core/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/telemetry", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "nocobase telemetry library", "license": "Apache-2.0", "main": "./lib/index.js", @@ -11,7 +11,7 @@ "directory": "packages/telemetry" }, "dependencies": { - "@nocobase/utils": "0.20.0-alpha.5", + "@nocobase/utils": "0.20.0-alpha.6", "@opentelemetry/api": "^1.7.0", "@opentelemetry/instrumentation": "^0.46.0", "@opentelemetry/resources": "^1.19.0", diff --git a/packages/core/test/package.json b/packages/core/test/package.json index 550b525e4..fec382332 100644 --- a/packages/core/test/package.json +++ b/packages/core/test/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/test", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "lib/index.js", "module": "./src/index.ts", "types": "./lib/index.d.ts", @@ -40,7 +40,7 @@ }, "dependencies": { "@faker-js/faker": "8.1.0", - "@nocobase/server": "0.20.0-alpha.5", + "@nocobase/server": "0.20.0-alpha.6", "@playwright/test": "^1.42.1", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index 73e9e1b57..b6eb223d4 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/utils", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", diff --git a/packages/plugins/@nocobase/plugin-acl/package.json b/packages/plugins/@nocobase/plugin-acl/package.json index 7c5b24e5f..73539d451 100644 --- a/packages/plugins/@nocobase/plugin-acl/package.json +++ b/packages/plugins/@nocobase/plugin-acl/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "权限控制", "description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.", "description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/acl", diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json index bc7ca0907..ddcc470cc 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-bulk-edit", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-bulk-edit", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-edit", diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/package.json b/packages/plugins/@nocobase/plugin-action-bulk-update/package.json index 53dc0d3f9..5bea028b4 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/package.json +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-bulk-update", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-bulk-update", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-update", diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/package.json b/packages/plugins/@nocobase/plugin-action-duplicate/package.json index d02ab0e4b..2ca025e5d 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/package.json +++ b/packages/plugins/@nocobase/plugin-action-duplicate/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-duplicate", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-duplicate", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-duplicate", diff --git a/packages/plugins/@nocobase/plugin-action-print/package.json b/packages/plugins/@nocobase/plugin-action-print/package.json index b0ba962b2..d110fc88a 100644 --- a/packages/plugins/@nocobase/plugin-action-print/package.json +++ b/packages/plugins/@nocobase/plugin-action-print/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-print", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-print", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-print", diff --git a/packages/plugins/@nocobase/plugin-api-doc/package.json b/packages/plugins/@nocobase/plugin-api-doc/package.json index 60153507c..85332c454 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/package.json +++ b/packages/plugins/@nocobase/plugin-api-doc/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-api-doc", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "displayName": "API documentation", "displayName.zh-CN": "API 文档", "description": "An OpenAPI documentation generator for NocoBase HTTP API.", diff --git a/packages/plugins/@nocobase/plugin-api-keys/package.json b/packages/plugins/@nocobase/plugin-api-keys/package.json index fbb420f87..4dad74ea0 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/package.json +++ b/packages/plugins/@nocobase/plugin-api-keys/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:API 密钥", "description": "Allows users to use API key to access application's HTTP API", "description.zh-CN": "允许用户使用 API 密钥访问应用的 HTTP API", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/api-keys", diff --git a/packages/plugins/@nocobase/plugin-audit-logs/package.json b/packages/plugins/@nocobase/plugin-audit-logs/package.json index 6aad15ebd..2748a9efb 100644 --- a/packages/plugins/@nocobase/plugin-audit-logs/package.json +++ b/packages/plugins/@nocobase/plugin-audit-logs/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-audit-logs", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "displayName": "Audit logs (deprecated)", "displayName.zh-CN": "审计日志(废弃)", "description": "This plugin is deprecated. There will be a new audit log plugin in the future.", diff --git a/packages/plugins/@nocobase/plugin-auth/package.json b/packages/plugins/@nocobase/plugin-auth/package.json index 4f1a10b9f..60b84ae61 100644 --- a/packages/plugins/@nocobase/plugin-auth/package.json +++ b/packages/plugins/@nocobase/plugin-auth/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-auth", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth", diff --git a/packages/plugins/@nocobase/plugin-backup-restore/package.json b/packages/plugins/@nocobase/plugin-backup-restore/package.json index bf467ac43..3efcde599 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/package.json +++ b/packages/plugins/@nocobase/plugin-backup-restore/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "应用的备份与还原", "description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.", "description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/backup-restore", diff --git a/packages/plugins/@nocobase/plugin-calendar/package.json b/packages/plugins/@nocobase/plugin-calendar/package.json index 097584947..66d799b37 100644 --- a/packages/plugins/@nocobase/plugin-calendar/package.json +++ b/packages/plugins/@nocobase/plugin-calendar/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-calendar", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "displayName": "Calendar", "displayName.zh-CN": "日历", "description": "Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on.", diff --git a/packages/plugins/@nocobase/plugin-cas/package.json b/packages/plugins/@nocobase/plugin-cas/package.json index 5155fc607..47b4e36f7 100644 --- a/packages/plugins/@nocobase/plugin-cas/package.json +++ b/packages/plugins/@nocobase/plugin-cas/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:CAS", "description": "CAS authentication.", "description.zh-CN": "通过 CAS 协议认证身份。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-cas", diff --git a/packages/plugins/@nocobase/plugin-charts/package.json b/packages/plugins/@nocobase/plugin-charts/package.json index b84acb187..6d16e20c2 100644 --- a/packages/plugins/@nocobase/plugin-charts/package.json +++ b/packages/plugins/@nocobase/plugin-charts/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "图表(废弃)", "description": "The plugin has been deprecated, please use the data visualization plugin instead.", "description.zh-CN": "已废弃插件,请使用数据可视化插件代替。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-china-region/package.json b/packages/plugins/@nocobase/plugin-china-region/package.json index 9574d4c1b..628ebb515 100644 --- a/packages/plugins/@nocobase/plugin-china-region/package.json +++ b/packages/plugins/@nocobase/plugin-china-region/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-china-region", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "displayName": "Administrative divisions of China", "displayName.zh-CN": "中国行政区划", "description": "Provides data and field type for administrative divisions of China.", diff --git a/packages/plugins/@nocobase/plugin-client/package.json b/packages/plugins/@nocobase/plugin-client/package.json index d80ef2aad..e3c3dd91e 100644 --- a/packages/plugins/@nocobase/plugin-client/package.json +++ b/packages/plugins/@nocobase/plugin-client/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "WEB 客户端", "description": "Provides a client interface for the NocoBase server", "description.zh-CN": "为 NocoBase 服务端提供客户端界面", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/package.json b/packages/plugins/@nocobase/plugin-collection-manager/package.json index bcbf1232a..f8a6f64ba 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-collection-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据源:主数据库", "description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.", "description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/data-source-main", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main", diff --git a/packages/plugins/@nocobase/plugin-custom-request/package.json b/packages/plugins/@nocobase/plugin-custom-request/package.json index 1508ee613..0a61785e8 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/package.json +++ b/packages/plugins/@nocobase/plugin-custom-request/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-custom-request", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-custom-request", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-custom-request", diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/package.json b/packages/plugins/@nocobase/plugin-data-source-manager/package.json index d91d99974..8b6032b15 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/package.json +++ b/packages/plugins/@nocobase/plugin-data-source-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-data-source-manager", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "displayName": "Data source manager", "displayName.zh-CN": "数据源管理", diff --git a/packages/plugins/@nocobase/plugin-data-visualization/package.json b/packages/plugins/@nocobase/plugin-data-visualization/package.json index cf2e1ec57..ed421f82e 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/package.json +++ b/packages/plugins/@nocobase/plugin-data-visualization/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-data-visualization", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "displayName": "Data visualization", "displayName.zh-CN": "数据可视化", "description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.", diff --git a/packages/plugins/@nocobase/plugin-disable-pm-add/package.json b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json index f30cb62f8..9194928e9 100644 --- a/packages/plugins/@nocobase/plugin-disable-pm-add/package.json +++ b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-disable-pm-add", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "peerDependencies": { "@nocobase/client": "0.x", diff --git a/packages/plugins/@nocobase/plugin-error-handler/package.json b/packages/plugins/@nocobase/plugin-error-handler/package.json index bfb627db0..521024496 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/package.json +++ b/packages/plugins/@nocobase/plugin-error-handler/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "错误处理器", "description": "Handling application errors and exceptions.", "description.zh-CN": "处理应用程序中的错误和异常。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-excel-formula-field/package.json b/packages/plugins/@nocobase/plugin-excel-formula-field/package.json index 48b22f899..21e6570a8 100644 --- a/packages/plugins/@nocobase/plugin-excel-formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-excel-formula-field/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-excel-formula-field", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/@nocobase/plugin-export/package.json b/packages/plugins/@nocobase/plugin-export/package.json index 646cfe03b..ae4d0808f 100644 --- a/packages/plugins/@nocobase/plugin-export/package.json +++ b/packages/plugins/@nocobase/plugin-export/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "操作:导出记录", "description": "Export filtered records to excel, you can configure which fields to export.", "description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-export", diff --git a/packages/plugins/@nocobase/plugin-file-manager/package.json b/packages/plugins/@nocobase/plugin-file-manager/package.json index 38bb78ba4..53b78622d 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/package.json +++ b/packages/plugins/@nocobase/plugin-file-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-file-manager", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "displayName": "File manager", "displayName.zh-CN": "文件管理器", "description": "Provides files storage services with files collection template and attachment field.", diff --git a/packages/plugins/@nocobase/plugin-formula-field/package.json b/packages/plugins/@nocobase/plugin-formula-field/package.json index 2245f622e..00289e011 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-formula-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:公式", "description": "Configure and store the results of calculations between multiple field values in the same record, supporting both Math.js and Excel formula functions.", "description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-formula", diff --git a/packages/plugins/@nocobase/plugin-gantt/package.json b/packages/plugins/@nocobase/plugin-gantt/package.json index 58ca2e22b..b83c27998 100644 --- a/packages/plugins/@nocobase/plugin-gantt/package.json +++ b/packages/plugins/@nocobase/plugin-gantt/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-gantt", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "displayName": "Block: Gantt", "displayName.zh-CN": "区块:甘特图", "description": "Provides Gantt block.", diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json index d814e458e..c4c66564d 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "可视化数据表管理", "description": "An ER diagram-like tool. Currently only the Master database is supported.", "description.zh-CN": "类似 ER 图的工具,目前只支持主数据库。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/graph-collection-manager", diff --git a/packages/plugins/@nocobase/plugin-iframe-block/package.json b/packages/plugins/@nocobase/plugin-iframe-block/package.json index e4b22bfa3..67fe6f795 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/package.json +++ b/packages/plugins/@nocobase/plugin-iframe-block/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "区块:iframe", "description": "Create an iframe block on the page to embed and display external web pages or content.", "description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/block-iframe", diff --git a/packages/plugins/@nocobase/plugin-import/package.json b/packages/plugins/@nocobase/plugin-import/package.json index 6830c18f7..347040e9e 100644 --- a/packages/plugins/@nocobase/plugin-import/package.json +++ b/packages/plugins/@nocobase/plugin-import/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "操作:导入记录", "description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.", "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-import", diff --git a/packages/plugins/@nocobase/plugin-kanban/package.json b/packages/plugins/@nocobase/plugin-kanban/package.json index 54c10d4dc..c92f1c710 100644 --- a/packages/plugins/@nocobase/plugin-kanban/package.json +++ b/packages/plugins/@nocobase/plugin-kanban/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-kanban", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/block-kanban", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/block-kanban", diff --git a/packages/plugins/@nocobase/plugin-localization-management/package.json b/packages/plugins/@nocobase/plugin-localization-management/package.json index 02fd9dedf..8453eddbb 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/package.json +++ b/packages/plugins/@nocobase/plugin-localization-management/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-localization-management", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/localization-management", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management", diff --git a/packages/plugins/@nocobase/plugin-logger/package.json b/packages/plugins/@nocobase/plugin-logger/package.json index afe85f567..6f7902874 100644 --- a/packages/plugins/@nocobase/plugin-logger/package.json +++ b/packages/plugins/@nocobase/plugin-logger/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "日志", "description": "Server-side logs, mainly including API request logs and system runtime logs, and allows to package and download log files.", "description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/logger", diff --git a/packages/plugins/@nocobase/plugin-map/package.json b/packages/plugins/@nocobase/plugin-map/package.json index b271a1d39..c503efcbf 100644 --- a/packages/plugins/@nocobase/plugin-map/package.json +++ b/packages/plugins/@nocobase/plugin-map/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-map", "displayName": "Block: Map", "displayName.zh-CN": "区块:地图", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "Map block, support Gaode map and Google map, you can also extend more map types.", "description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。", "license": "AGPL-3.0", diff --git a/packages/plugins/@nocobase/plugin-math-formula-field/package.json b/packages/plugins/@nocobase/plugin-math-formula-field/package.json index 84d200a82..a214d9641 100644 --- a/packages/plugins/@nocobase/plugin-math-formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-math-formula-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数学公式字段", "description": "A powerful mathematical formula field plugin designed to provide flexible mathematical and formula calculation capabilities for databases or data management systems. It seamlessly integrates with various database systems such as MySQL, PostgreSQL, and offers an intuitive user interface for defining and executing mathematical formula fields.", "description.zh-CN": "一个功能强大的数学公式字段插件,旨在为数据库或数据管理系统提供灵活的数学计算和公式计算功能。它可以与各种数据库系统(如MySQL、PostgreSQL)无缝集成,并提供直观的用户界面来定义和执行数学公式字段。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-mobile-client/package.json b/packages/plugins/@nocobase/plugin-mobile-client/package.json index 34141d4a1..1183b310c 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/package.json +++ b/packages/plugins/@nocobase/plugin-mobile-client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-mobile-client", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/mobile-client", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client", diff --git a/packages/plugins/@nocobase/plugin-mock-collections/package.json b/packages/plugins/@nocobase/plugin-mock-collections/package.json index 5d7960b71..cb562d35b 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/package.json +++ b/packages/plugins/@nocobase/plugin-mock-collections/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-mock-collections", "displayName": "mock-collections", "description": "mock-collections", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "license": "AGPL-3.0", "peerDependencies": { diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json index 5a537fbd0..57decb702 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "多应用管理器", "description": "Dynamically create multiple apps without separate deployments.", "description.zh-CN": "无需单独部署即可动态创建多个应用。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/multi-app-manager", diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json index e85351908..5dbc5a6c5 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "多应用数据表共享", "description": "", "description.zh-CN": "", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "devDependencies": { "@formily/react": "2.x", diff --git a/packages/plugins/@nocobase/plugin-notifications/package.json b/packages/plugins/@nocobase/plugin-notifications/package.json index a11047e4e..ef82e5c81 100644 --- a/packages/plugins/@nocobase/plugin-notifications/package.json +++ b/packages/plugins/@nocobase/plugin-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-notifications", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "description": "", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/@nocobase/plugin-oidc/package.json b/packages/plugins/@nocobase/plugin-oidc/package.json index 677d8d1c5..82b723a65 100644 --- a/packages/plugins/@nocobase/plugin-oidc/package.json +++ b/packages/plugins/@nocobase/plugin-oidc/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:OIDC", "description": "OIDC (OpenID Connect) authentication.", "description.zh-CN": "通过 OIDC (OpenID Connect) 协议认证身份。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-oidc", diff --git a/packages/plugins/@nocobase/plugin-saml/package.json b/packages/plugins/@nocobase/plugin-saml/package.json index 7b5516e78..67f70dad3 100644 --- a/packages/plugins/@nocobase/plugin-saml/package.json +++ b/packages/plugins/@nocobase/plugin-saml/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:SAML 2.0", "description": "SAML 2.0 authentication.", "description.zh-CN": "通过 SAML 2.0 协议认证身份。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-saml", diff --git a/packages/plugins/@nocobase/plugin-sample-hello/package.json b/packages/plugins/@nocobase/plugin-sample-hello/package.json index 3374a9012..d0b2a9544 100644 --- a/packages/plugins/@nocobase/plugin-sample-hello/package.json +++ b/packages/plugins/@nocobase/plugin-sample-hello/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-sample-hello", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "displayName": "Hello", "displayName.zh-CN": "Hello", diff --git a/packages/plugins/@nocobase/plugin-sequence-field/package.json b/packages/plugins/@nocobase/plugin-sequence-field/package.json index a428a2d48..7890173dc 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/package.json +++ b/packages/plugins/@nocobase/plugin-sequence-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:自动编码", "description": "Automatically generate codes based on configured rules, supporting combinations of dates, numbers, and text.", "description.zh-CN": "根据配置的规则自动生成编码,支持日期、数字、文本的组合。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-sequence", diff --git a/packages/plugins/@nocobase/plugin-sms-auth/package.json b/packages/plugins/@nocobase/plugin-sms-auth/package.json index 8c5d87bc4..9242e66c5 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/package.json +++ b/packages/plugins/@nocobase/plugin-sms-auth/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:短信", "description": "SMS authentication.", "description.zh-CN": "通过短信验证码认证身份。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-sms", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-sms", diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/package.json b/packages/plugins/@nocobase/plugin-snapshot-field/package.json index e7e0c591a..6860cde70 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/package.json +++ b/packages/plugins/@nocobase/plugin-snapshot-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:关系快照", "description": "When adding a new record, create a snapshot for its relational record and save in the new record. The snapshot will not be updated when the relational record is updated.", "description.zh-CN": "在添加数据时,为它的关系数据创建快照,并保存在当前的数据中。关系数据更新时,快照不会更新。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-snapshot", diff --git a/packages/plugins/@nocobase/plugin-system-settings/package.json b/packages/plugins/@nocobase/plugin-system-settings/package.json index efc4f12c2..9560965cd 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/package.json +++ b/packages/plugins/@nocobase/plugin-system-settings/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "系统设置", "description": "Used to adjust the system title, logo, language, etc.", "description.zh-CN": "用于调整系统的标题、LOGO、语言等。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/system-settings", diff --git a/packages/plugins/@nocobase/plugin-theme-editor/package.json b/packages/plugins/@nocobase/plugin-theme-editor/package.json index e3b1bb052..6c53b594c 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/package.json +++ b/packages/plugins/@nocobase/plugin-theme-editor/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-theme-editor", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/theme-editor", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/theme-editor", diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json b/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json index 885a991ee..8cfd5debd 100644 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json +++ b/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "路由管理", "description": "manage the routes of nocobase", "description.zh-CN": "管理页面路由。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json index fa2148684..a14b956b3 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "UI schema 存储服务", "description": "Provides centralized UI schema storage service.", "description.zh-CN": "提供中心化的 UI schema 存储服务。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/ui-schema-storage", diff --git a/packages/plugins/@nocobase/plugin-users/package.json b/packages/plugins/@nocobase/plugin-users/package.json index 7c59cdea6..015489a80 100644 --- a/packages/plugins/@nocobase/plugin-users/package.json +++ b/packages/plugins/@nocobase/plugin-users/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "用户", "description": "Provides basic user model, as well as created by and updated by fields.", "description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/users", diff --git a/packages/plugins/@nocobase/plugin-verification/package.json b/packages/plugins/@nocobase/plugin-verification/package.json index a1abc3b86..ca8d466e8 100644 --- a/packages/plugins/@nocobase/plugin-verification/package.json +++ b/packages/plugins/@nocobase/plugin-verification/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "验证码", "description": "verification setting.", "description.zh-CN": "验证码配置。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/verification", diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json index 608d9c969..62722d695 100644 --- a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:数据操作触发器", "description": "Bind action buttons to trigger workflow events when clicked.", "description.zh-CN": "可对数据操作按钮绑定,在点击后触发对应的工作流事件。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/plugins/workflow-action-trigger", diff --git a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json index bff0f4e77..b4420d80c 100644 --- a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:聚合查询节点", "description": "Used to aggregate data against the database in workflow, such as: statistics, sum, average, etc.", "description.zh-CN": "可用于在工作流中对数据库进行聚合查询,如:统计数量、求和、平均值等。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-aggregate", diff --git a/packages/plugins/@nocobase/plugin-workflow-delay/package.json b/packages/plugins/@nocobase/plugin-workflow-delay/package.json index 26056b5d0..ae03d0e8d 100644 --- a/packages/plugins/@nocobase/plugin-workflow-delay/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-delay/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:延时节点", "description": "Could be used in workflow parallel branch for waiting other branches.", "description.zh-CN": "可用于工作流并行分支中等待其他分支执行完成。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-delay", diff --git a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json index 0d7e0065e..2bd8a70f8 100644 --- a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:动态表达式计算节点", "description": "Useful plugin for doing dynamic calculation based on expression collection records in workflow.", "description.zh-CN": "用于在工作流中进行基于数据行的动态表达式计算。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-dynamic-calculation", diff --git a/packages/plugins/@nocobase/plugin-workflow-loop/package.json b/packages/plugins/@nocobase/plugin-workflow-loop/package.json index 8068ae74d..ca9a0e67f 100644 --- a/packages/plugins/@nocobase/plugin-workflow-loop/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-loop/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:循环节点", "description": "Used to repeat the sub-process processing of each value in an array, and can also be used for fixed times of sub-process processing.", "description.zh-CN": "用于对一个数组中的每个值进行重复的子流程处理,也可用于固定次数的重复子流程处理。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-loop", diff --git a/packages/plugins/@nocobase/plugin-workflow-manual/package.json b/packages/plugins/@nocobase/plugin-workflow-manual/package.json index 05dac14ae..cb6541e72 100644 --- a/packages/plugins/@nocobase/plugin-workflow-manual/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-manual/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:人工处理节点", "description": "Could be used for workflows which some of decisions are made by users.", "description.zh-CN": "用于人工控制部分决策的流程。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-manual", diff --git a/packages/plugins/@nocobase/plugin-workflow-parallel/package.json b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json index 11e95b7b5..ea5217db3 100644 --- a/packages/plugins/@nocobase/plugin-workflow-parallel/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:并行分支节点", "description": "Could be used for parallel execution of branch processes in the workflow.", "description.zh-CN": "用于在工作流中需要并行执行的分支流程。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-parallel", diff --git a/packages/plugins/@nocobase/plugin-workflow-request/package.json b/packages/plugins/@nocobase/plugin-workflow-request/package.json index 439157b43..d0d295052 100644 --- a/packages/plugins/@nocobase/plugin-workflow-request/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-request/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:HTTP 请求节点", "description": "Send HTTP requests to any HTTP service for data interaction in workflow.", "description.zh-CN": "可用于在工作流中向任意 HTTP 服务发送请求,进行数据交互。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-request", diff --git a/packages/plugins/@nocobase/plugin-workflow-sql/package.json b/packages/plugins/@nocobase/plugin-workflow-sql/package.json index 37ff10d24..6950dcbf6 100644 --- a/packages/plugins/@nocobase/plugin-workflow-sql/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-sql/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:SQL 节点", "description": "Execute SQL statements in workflow.", "description.zh-CN": "可用于在工作流中对数据库执行任意 SQL 语句。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-sql", diff --git a/packages/plugins/@nocobase/plugin-workflow-test/package.json b/packages/plugins/@nocobase/plugin-workflow-test/package.json index c470e5f6e..4fe100ea0 100644 --- a/packages/plugins/@nocobase/plugin-workflow-test/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-test/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-workflow-test", "displayName": "Workflow: test kit", "displayName.zh-CN": "工作流:测试工具包", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "dist/server/index.js", "types": "./dist/server/index.d.ts", diff --git a/packages/plugins/@nocobase/plugin-workflow/package.json b/packages/plugins/@nocobase/plugin-workflow/package.json index 32cd17ba8..4b89c8bfe 100644 --- a/packages/plugins/@nocobase/plugin-workflow/package.json +++ b/packages/plugins/@nocobase/plugin-workflow/package.json @@ -4,13 +4,13 @@ "displayName.zh-CN": "工作流", "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.", "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow", "dependencies": { - "@nocobase/plugin-workflow-test": "0.20.0-alpha.5" + "@nocobase/plugin-workflow-test": "0.20.0-alpha.6" }, "devDependencies": { "@ant-design/icons": "5.x", diff --git a/packages/presets/nocobase/package.json b/packages/presets/nocobase/package.json index 657f00a47..3b80ae4ac 100644 --- a/packages/presets/nocobase/package.json +++ b/packages/presets/nocobase/package.json @@ -1,66 +1,66 @@ { "name": "@nocobase/preset-nocobase", - "version": "0.20.0-alpha.5", + "version": "0.20.0-alpha.6", "license": "AGPL-3.0", "main": "./lib/server/index.js", "dependencies": { "@formily/json-schema": "2.x", - "@nocobase/plugin-acl": "0.20.0-alpha.5", - "@nocobase/plugin-action-bulk-edit": "0.20.0-alpha.5", - "@nocobase/plugin-action-bulk-update": "0.20.0-alpha.5", - "@nocobase/plugin-action-duplicate": "0.20.0-alpha.5", - "@nocobase/plugin-action-print": "0.20.0-alpha.5", - "@nocobase/plugin-api-doc": "0.20.0-alpha.5", - "@nocobase/plugin-api-keys": "0.20.0-alpha.5", - "@nocobase/plugin-audit-logs": "0.20.0-alpha.5", - "@nocobase/plugin-auth": "0.20.0-alpha.5", - "@nocobase/plugin-backup-restore": "0.20.0-alpha.5", - "@nocobase/plugin-calendar": "0.20.0-alpha.5", - "@nocobase/plugin-cas": "0.20.0-alpha.5", - "@nocobase/plugin-charts": "0.20.0-alpha.5", - "@nocobase/plugin-china-region": "0.20.0-alpha.5", - "@nocobase/plugin-client": "0.20.0-alpha.5", - "@nocobase/plugin-collection-manager": "0.20.0-alpha.5", - "@nocobase/plugin-custom-request": "0.20.0-alpha.5", - "@nocobase/plugin-data-source-manager": "0.20.0-alpha.5", - "@nocobase/plugin-data-visualization": "0.20.0-alpha.5", - "@nocobase/plugin-error-handler": "0.20.0-alpha.5", - "@nocobase/plugin-export": "0.20.0-alpha.5", - "@nocobase/plugin-file-manager": "0.20.0-alpha.5", - "@nocobase/plugin-formula-field": "0.20.0-alpha.5", - "@nocobase/plugin-gantt": "0.20.0-alpha.5", - "@nocobase/plugin-graph-collection-manager": "0.20.0-alpha.5", - "@nocobase/plugin-iframe-block": "0.20.0-alpha.5", - "@nocobase/plugin-import": "0.20.0-alpha.5", - "@nocobase/plugin-kanban": "0.20.0-alpha.5", - "@nocobase/plugin-localization-management": "0.20.0-alpha.5", - "@nocobase/plugin-logger": "0.20.0-alpha.5", - "@nocobase/plugin-map": "0.20.0-alpha.5", - "@nocobase/plugin-mobile-client": "0.20.0-alpha.5", - "@nocobase/plugin-mock-collections": "0.20.0-alpha.5", - "@nocobase/plugin-multi-app-manager": "0.20.0-alpha.5", - "@nocobase/plugin-multi-app-share-collection": "0.20.0-alpha.5", - "@nocobase/plugin-oidc": "0.20.0-alpha.5", - "@nocobase/plugin-saml": "0.20.0-alpha.5", - "@nocobase/plugin-sequence-field": "0.20.0-alpha.5", - "@nocobase/plugin-sms-auth": "0.20.0-alpha.5", - "@nocobase/plugin-snapshot-field": "0.20.0-alpha.5", - "@nocobase/plugin-system-settings": "0.20.0-alpha.5", - "@nocobase/plugin-theme-editor": "0.20.0-alpha.5", - "@nocobase/plugin-ui-schema-storage": "0.20.0-alpha.5", - "@nocobase/plugin-users": "0.20.0-alpha.5", - "@nocobase/plugin-verification": "0.20.0-alpha.5", - "@nocobase/plugin-workflow": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-action-trigger": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-aggregate": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-delay": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-dynamic-calculation": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-loop": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-manual": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-parallel": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-request": "0.20.0-alpha.5", - "@nocobase/plugin-workflow-sql": "0.20.0-alpha.5", - "@nocobase/server": "0.20.0-alpha.5", + "@nocobase/plugin-acl": "0.20.0-alpha.6", + "@nocobase/plugin-action-bulk-edit": "0.20.0-alpha.6", + "@nocobase/plugin-action-bulk-update": "0.20.0-alpha.6", + "@nocobase/plugin-action-duplicate": "0.20.0-alpha.6", + "@nocobase/plugin-action-print": "0.20.0-alpha.6", + "@nocobase/plugin-api-doc": "0.20.0-alpha.6", + "@nocobase/plugin-api-keys": "0.20.0-alpha.6", + "@nocobase/plugin-audit-logs": "0.20.0-alpha.6", + "@nocobase/plugin-auth": "0.20.0-alpha.6", + "@nocobase/plugin-backup-restore": "0.20.0-alpha.6", + "@nocobase/plugin-calendar": "0.20.0-alpha.6", + "@nocobase/plugin-cas": "0.20.0-alpha.6", + "@nocobase/plugin-charts": "0.20.0-alpha.6", + "@nocobase/plugin-china-region": "0.20.0-alpha.6", + "@nocobase/plugin-client": "0.20.0-alpha.6", + "@nocobase/plugin-collection-manager": "0.20.0-alpha.6", + "@nocobase/plugin-custom-request": "0.20.0-alpha.6", + "@nocobase/plugin-data-source-manager": "0.20.0-alpha.6", + "@nocobase/plugin-data-visualization": "0.20.0-alpha.6", + "@nocobase/plugin-error-handler": "0.20.0-alpha.6", + "@nocobase/plugin-export": "0.20.0-alpha.6", + "@nocobase/plugin-file-manager": "0.20.0-alpha.6", + "@nocobase/plugin-formula-field": "0.20.0-alpha.6", + "@nocobase/plugin-gantt": "0.20.0-alpha.6", + "@nocobase/plugin-graph-collection-manager": "0.20.0-alpha.6", + "@nocobase/plugin-iframe-block": "0.20.0-alpha.6", + "@nocobase/plugin-import": "0.20.0-alpha.6", + "@nocobase/plugin-kanban": "0.20.0-alpha.6", + "@nocobase/plugin-localization-management": "0.20.0-alpha.6", + "@nocobase/plugin-logger": "0.20.0-alpha.6", + "@nocobase/plugin-map": "0.20.0-alpha.6", + "@nocobase/plugin-mobile-client": "0.20.0-alpha.6", + "@nocobase/plugin-mock-collections": "0.20.0-alpha.6", + "@nocobase/plugin-multi-app-manager": "0.20.0-alpha.6", + "@nocobase/plugin-multi-app-share-collection": "0.20.0-alpha.6", + "@nocobase/plugin-oidc": "0.20.0-alpha.6", + "@nocobase/plugin-saml": "0.20.0-alpha.6", + "@nocobase/plugin-sequence-field": "0.20.0-alpha.6", + "@nocobase/plugin-sms-auth": "0.20.0-alpha.6", + "@nocobase/plugin-snapshot-field": "0.20.0-alpha.6", + "@nocobase/plugin-system-settings": "0.20.0-alpha.6", + "@nocobase/plugin-theme-editor": "0.20.0-alpha.6", + "@nocobase/plugin-ui-schema-storage": "0.20.0-alpha.6", + "@nocobase/plugin-users": "0.20.0-alpha.6", + "@nocobase/plugin-verification": "0.20.0-alpha.6", + "@nocobase/plugin-workflow": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-action-trigger": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-aggregate": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-delay": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-dynamic-calculation": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-loop": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-manual": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-parallel": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-request": "0.20.0-alpha.6", + "@nocobase/plugin-workflow-sql": "0.20.0-alpha.6", + "@nocobase/server": "0.20.0-alpha.6", "cronstrue": "^2.11.0" }, "repository": { From 12ba7cd9d0c48dc7b7048ebb73bb93be79e41ac8 Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 8 Mar 2024 10:23:29 +0800 Subject: [PATCH 04/19] chore: update changelog --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdebc6740..1a0b567b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +## [v0.20.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.20.0-alpha.5...v0.20.0-alpha.6) - 2024-03-08 + +### Merged + +- fix: parse association field in acl [`#3655`](https://github.com/nocobase/nocobase/pull/3655) +- chore: update menu name of plugin-localization [`#3653`](https://github.com/nocobase/nocobase/pull/3653) +- chore(pm): set plugin-sms-auth as local plugin, close T-3323 [`#3652`](https://github.com/nocobase/nocobase/pull/3652) +- fix(cascadeSelect): cassadeSelect does not dislay data in edit form [`#3649`](https://github.com/nocobase/nocobase/pull/3649) +- fix(db): through scope in eager loading & fix(acl): filter reset issue [`#3636`](https://github.com/nocobase/nocobase/pull/3636) +- fix: dateTime format configured in table is invalid [`#3630`](https://github.com/nocobase/nocobase/pull/3630) +- fix: data source permission role update [`#3643`](https://github.com/nocobase/nocobase/pull/3643) +- style: flexWrap in actionBar [`#3635`](https://github.com/nocobase/nocobase/pull/3635) +- fix: add displayName [`#3628`](https://github.com/nocobase/nocobase/pull/3628) +- fix(customRequestAction): should not support setting icons and colours [`#3632`](https://github.com/nocobase/nocobase/pull/3632) +- fix(workflow-action-trigger): change plugin name [`#3631`](https://github.com/nocobase/nocobase/pull/3631) +- fix: graph collection postions data missing [`#3627`](https://github.com/nocobase/nocobase/pull/3627) +- fix(ActionLink): fix hover style [`#3629`](https://github.com/nocobase/nocobase/pull/3629) +- feat(plugin-workflow-form-trigger): add trigger button to all single record action bar [`#3563`](https://github.com/nocobase/nocobase/pull/3563) +- fix: sidebar menu text overflow [`#3626`](https://github.com/nocobase/nocobase/pull/3626) +- fix(acl-plugin-setting): pluginPermissions for snippets check [`#3622`](https://github.com/nocobase/nocobase/pull/3622) +- fix(subTable): fix changing title field invalid [`#3625`](https://github.com/nocobase/nocobase/pull/3625) +- fix: fix hover style for sub table [`#3623`](https://github.com/nocobase/nocobase/pull/3623) + +### Commits + +- chore(versions): 😊 publish v0.20.0-alpha.6 [`8b4821e`](https://github.com/nocobase/nocobase/commit/8b4821e2df39958f7befa9aa0abd203cd162bace) +- chore: update yarn.lock [`1088756`](https://github.com/nocobase/nocobase/commit/108875600c4baf9824246c43bcbdd858876e5fd1) +- chore: update changelog [`f9a10de`](https://github.com/nocobase/nocobase/commit/f9a10de9811b7a35b13f67d9007051487321e993) + ## [v0.20.0-alpha.5](https://github.com/nocobase/nocobase/compare/v0.20.0-alpha.4...v0.20.0-alpha.5) - 2024-03-06 ### Merged From 2fc13c180c009253518a00dadae50ba62a358588 Mon Sep 17 00:00:00 2001 From: jack zhang <1098626505@qq.com> Date: Fri, 8 Mar 2024 11:18:32 +0800 Subject: [PATCH 05/19] fix: getCollection bug (#3656) --- packages/core/client/src/block-provider/hooks/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index 051ac5463..7f2aefc6c 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1273,8 +1273,8 @@ export const useAssociationNames = (dataSource?: string) => { collectAppends(condition); }); } - - const isTreeCollection = isAssociationField && getCollection(collectionField.target)?.template === 'tree'; + const isTreeCollection = + isAssociationField && getCollection(collectionField.target, dataSource)?.template === 'tree'; if (collectionField && (isAssociationField || isAssociationSubfield) && s['x-component'] !== 'TableField') { const fieldPath = !isAssociationField && isAssociationSubfield ? getAssociationPath(s.name) : s.name; const path = prefix === '' || !prefix ? fieldPath : prefix + '.' + fieldPath; From db045c61d2cdc79de9748b25a8caa1e16f54ade3 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Fri, 8 Mar 2024 12:00:59 +0800 Subject: [PATCH 06/19] fix: view collection interface missing (#3658) --- .../templates/components/PreviewFields.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx index b7ca62c28..b3b71c560 100644 --- a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx +++ b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx @@ -60,12 +60,12 @@ const PreviewCom = (props) => { const children = collection.fields .filter((v) => !['hasOne', 'hasMany', 'belongsToMany'].includes(v?.type)) ?.map((v) => { - return { value: v.name, key: v.name, label: t(v.uiSchema?.title) }; + return { value: v.name, key: v.name, label: t(v.uiSchema?.title || v.name) }; }) .concat(result); data.push({ value: item, - label: t(collection.title), + label: t(collection.title || collection.name), children, }); }); @@ -187,7 +187,7 @@ const PreviewCom = (props) => { {data.map((group) => ( {group.children.map((item) => ( - + {compile(item.label)} ))} From 8dbae24489a8f2dcb3fd055a89225454394501e7 Mon Sep 17 00:00:00 2001 From: YANG QIA <2013xile@gmail.com> Date: Fri, 8 Mar 2024 13:38:41 +0800 Subject: [PATCH 07/19] chore(ci): change branch of pro image --- .github/workflows/build-pro-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pro-image.yml b/.github/workflows/build-pro-image.yml index 714104d8c..a9b4670d8 100644 --- a/.github/workflows/build-pro-image.yml +++ b/.github/workflows/build-pro-image.yml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v3 with: repository: nocobase/pro-plugins - ref: feat/dataSource-manager + ref: main path: packages/pro-plugins ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }} - name: rm .git From 63d1a8d90ca30056f7dd48bc012c30590b727cb8 Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 8 Mar 2024 14:11:35 +0800 Subject: [PATCH 08/19] =?UTF-8?q?chore(versions):=20=F0=9F=98=8A=20publish?= =?UTF-8?q?=20v0.20.0-alpha.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lerna.json | 2 +- packages/core/acl/package.json | 6 +- packages/core/actions/package.json | 8 +- packages/core/app/package.json | 10 +- packages/core/auth/package.json | 12 +- packages/core/build/package.json | 2 +- packages/core/cache/package.json | 2 +- packages/core/cli/package.json | 6 +- packages/core/client/package.json | 8 +- .../core/create-nocobase-app/package.json | 2 +- .../core/data-source-manager/package.json | 12 +- packages/core/database/package.json | 6 +- packages/core/devtools/package.json | 8 +- packages/core/evaluators/package.json | 4 +- packages/core/logger/package.json | 2 +- packages/core/resourcer/package.json | 4 +- packages/core/sdk/package.json | 2 +- packages/core/server/package.json | 26 ++-- packages/core/telemetry/package.json | 4 +- packages/core/test/package.json | 4 +- packages/core/utils/package.json | 2 +- .../plugins/@nocobase/plugin-acl/package.json | 2 +- .../plugin-action-bulk-edit/package.json | 2 +- .../plugin-action-bulk-update/package.json | 2 +- .../plugin-action-duplicate/package.json | 2 +- .../plugin-action-print/package.json | 2 +- .../@nocobase/plugin-api-doc/package.json | 2 +- .../@nocobase/plugin-api-keys/package.json | 2 +- .../@nocobase/plugin-audit-logs/package.json | 2 +- .../@nocobase/plugin-auth/package.json | 2 +- .../plugin-backup-restore/package.json | 2 +- .../@nocobase/plugin-calendar/package.json | 2 +- .../plugins/@nocobase/plugin-cas/package.json | 2 +- .../@nocobase/plugin-charts/package.json | 2 +- .../plugin-china-region/package.json | 2 +- .../@nocobase/plugin-client/package.json | 2 +- .../plugin-collection-manager/package.json | 2 +- .../plugin-custom-request/package.json | 2 +- .../plugin-data-source-manager/package.json | 2 +- .../plugin-data-visualization/package.json | 2 +- .../plugin-disable-pm-add/package.json | 2 +- .../plugin-error-handler/package.json | 2 +- .../plugin-excel-formula-field/package.json | 2 +- .../@nocobase/plugin-export/package.json | 2 +- .../plugin-file-manager/package.json | 2 +- .../plugin-formula-field/package.json | 2 +- .../@nocobase/plugin-gantt/package.json | 2 +- .../package.json | 2 +- .../plugin-iframe-block/package.json | 2 +- .../@nocobase/plugin-import/package.json | 2 +- .../@nocobase/plugin-kanban/package.json | 2 +- .../package.json | 2 +- .../@nocobase/plugin-logger/package.json | 2 +- .../plugins/@nocobase/plugin-map/package.json | 2 +- .../plugin-math-formula-field/package.json | 2 +- .../plugin-mobile-client/package.json | 2 +- .../plugin-mock-collections/package.json | 2 +- .../plugin-multi-app-manager/package.json | 2 +- .../package.json | 2 +- .../plugin-notifications/package.json | 2 +- .../@nocobase/plugin-oidc/package.json | 2 +- .../@nocobase/plugin-saml/package.json | 2 +- .../plugin-sample-hello/package.json | 2 +- .../plugin-sequence-field/package.json | 2 +- .../@nocobase/plugin-sms-auth/package.json | 2 +- .../plugin-snapshot-field/package.json | 2 +- .../plugin-system-settings/package.json | 2 +- .../plugin-theme-editor/package.json | 2 +- .../plugin-ui-routes-storage/package.json | 2 +- .../plugin-ui-schema-storage/package.json | 2 +- .../@nocobase/plugin-users/package.json | 2 +- .../plugin-verification/package.json | 2 +- .../package.json | 2 +- .../plugin-workflow-aggregate/package.json | 2 +- .../plugin-workflow-delay/package.json | 2 +- .../package.json | 2 +- .../plugin-workflow-loop/package.json | 2 +- .../plugin-workflow-manual/package.json | 2 +- .../plugin-workflow-parallel/package.json | 2 +- .../plugin-workflow-request/package.json | 2 +- .../plugin-workflow-sql/package.json | 2 +- .../plugin-workflow-test/package.json | 2 +- .../@nocobase/plugin-workflow/package.json | 4 +- packages/presets/nocobase/package.json | 114 +++++++++--------- 84 files changed, 186 insertions(+), 186 deletions(-) diff --git a/lerna.json b/lerna.json index 07e365c53..e52e5b8c5 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "npmClient": "yarn", "useWorkspaces": true, "npmClientArgs": ["--ignore-engines"], diff --git a/packages/core/acl/package.json b/packages/core/acl/package.json index 1c83ea64c..b1d1dc2b2 100644 --- a/packages/core/acl/package.json +++ b/packages/core/acl/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/acl", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/resourcer": "0.20.0-alpha.6", - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/resourcer": "0.20.0-alpha.7", + "@nocobase/utils": "0.20.0-alpha.7", "minimatch": "^5.1.1" }, "repository": { diff --git a/packages/core/actions/package.json b/packages/core/actions/package.json index 7ef2f74fc..ebc814b7f 100644 --- a/packages/core/actions/package.json +++ b/packages/core/actions/package.json @@ -1,14 +1,14 @@ { "name": "@nocobase/actions", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/cache": "0.20.0-alpha.6", - "@nocobase/database": "0.20.0-alpha.6", - "@nocobase/resourcer": "0.20.0-alpha.6" + "@nocobase/cache": "0.20.0-alpha.7", + "@nocobase/database": "0.20.0-alpha.7", + "@nocobase/resourcer": "0.20.0-alpha.7" }, "repository": { "type": "git", diff --git a/packages/core/app/package.json b/packages/core/app/package.json index c59f0e319..d83dc75cf 100644 --- a/packages/core/app/package.json +++ b/packages/core/app/package.json @@ -1,17 +1,17 @@ { "name": "@nocobase/app", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/database": "0.20.0-alpha.6", - "@nocobase/preset-nocobase": "0.20.0-alpha.6", - "@nocobase/server": "0.20.0-alpha.6" + "@nocobase/database": "0.20.0-alpha.7", + "@nocobase/preset-nocobase": "0.20.0-alpha.7", + "@nocobase/server": "0.20.0-alpha.7" }, "devDependencies": { - "@nocobase/client": "0.20.0-alpha.6" + "@nocobase/client": "0.20.0-alpha.7" }, "repository": { "type": "git", diff --git a/packages/core/auth/package.json b/packages/core/auth/package.json index 1dcd54b86..4018db073 100644 --- a/packages/core/auth/package.json +++ b/packages/core/auth/package.json @@ -1,16 +1,16 @@ { "name": "@nocobase/auth", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/actions": "0.20.0-alpha.6", - "@nocobase/cache": "0.20.0-alpha.6", - "@nocobase/database": "0.20.0-alpha.6", - "@nocobase/resourcer": "0.20.0-alpha.6", - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/actions": "0.20.0-alpha.7", + "@nocobase/cache": "0.20.0-alpha.7", + "@nocobase/database": "0.20.0-alpha.7", + "@nocobase/resourcer": "0.20.0-alpha.7", + "@nocobase/utils": "0.20.0-alpha.7", "@types/jsonwebtoken": "^8.5.8", "jsonwebtoken": "^8.5.1" }, diff --git a/packages/core/build/package.json b/packages/core/build/package.json index 866f7b6b5..510a3df12 100755 --- a/packages/core/build/package.json +++ b/packages/core/build/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/build", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "Library build tool based on rollup.", "main": "lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/core/cache/package.json b/packages/core/cache/package.json index c233d7f84..46b64d772 100644 --- a/packages/core/cache/package.json +++ b/packages/core/cache/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/cache", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", diff --git a/packages/core/cli/package.json b/packages/core/cli/package.json index 665e06859..17f9727e2 100644 --- a/packages/core/cli/package.json +++ b/packages/core/cli/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/cli", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "Apache-2.0", "main": "./src/index.js", @@ -8,7 +8,7 @@ "nocobase": "./bin/index.js" }, "dependencies": { - "@nocobase/app": "0.20.0-alpha.6", + "@nocobase/app": "0.20.0-alpha.7", "@types/fs-extra": "^11.0.1", "@umijs/utils": "3.5.20", "chalk": "^4.1.1", @@ -25,7 +25,7 @@ "tsx": "^4.6.2" }, "devDependencies": { - "@nocobase/devtools": "0.20.0-alpha.6" + "@nocobase/devtools": "0.20.0-alpha.7" }, "repository": { "type": "git", diff --git a/packages/core/client/package.json b/packages/core/client/package.json index 107a34bfc..4de2f1042 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/client", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "Apache-2.0", "main": "lib/index.js", "module": "es/index.mjs", @@ -26,9 +26,9 @@ "@formily/reactive-react": "^2.2.27", "@formily/shared": "^2.2.27", "@formily/validator": "^2.2.27", - "@nocobase/evaluators": "0.20.0-alpha.6", - "@nocobase/sdk": "0.20.0-alpha.6", - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/evaluators": "0.20.0-alpha.7", + "@nocobase/sdk": "0.20.0-alpha.7", + "@nocobase/utils": "0.20.0-alpha.7", "ahooks": "^3.7.2", "antd": "^5.12.8", "antd-style": "3.4.5", diff --git a/packages/core/create-nocobase-app/package.json b/packages/core/create-nocobase-app/package.json index 3d1bc6f18..e1e46b7ae 100755 --- a/packages/core/create-nocobase-app/package.json +++ b/packages/core/create-nocobase-app/package.json @@ -1,6 +1,6 @@ { "name": "create-nocobase-app", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "src/index.js", "license": "Apache-2.0", "dependencies": { diff --git a/packages/core/data-source-manager/package.json b/packages/core/data-source-manager/package.json index 698d49ef8..2dcb7346a 100644 --- a/packages/core/data-source-manager/package.json +++ b/packages/core/data-source-manager/package.json @@ -1,16 +1,16 @@ { "name": "@nocobase/data-source-manager", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/actions": "0.20.0-alpha.6", - "@nocobase/cache": "0.20.0-alpha.6", - "@nocobase/database": "0.20.0-alpha.6", - "@nocobase/resourcer": "0.20.0-alpha.6", - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/actions": "0.20.0-alpha.7", + "@nocobase/cache": "0.20.0-alpha.7", + "@nocobase/database": "0.20.0-alpha.7", + "@nocobase/resourcer": "0.20.0-alpha.7", + "@nocobase/utils": "0.20.0-alpha.7", "@types/jsonwebtoken": "^8.5.8", "jsonwebtoken": "^8.5.1" }, diff --git a/packages/core/database/package.json b/packages/core/database/package.json index 88bd19dd6..4b5ae3c74 100644 --- a/packages/core/database/package.json +++ b/packages/core/database/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/database", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", "dependencies": { - "@nocobase/logger": "0.20.0-alpha.6", - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/logger": "0.20.0-alpha.7", + "@nocobase/utils": "0.20.0-alpha.7", "async-mutex": "^0.3.2", "chalk": "^4.1.1", "cron-parser": "4.4.0", diff --git a/packages/core/devtools/package.json b/packages/core/devtools/package.json index ae8889480..f4bbf798f 100644 --- a/packages/core/devtools/package.json +++ b/packages/core/devtools/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/devtools", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "Apache-2.0", "main": "./src/index.js", "dependencies": { - "@nocobase/build": "0.20.0-alpha.6", - "@nocobase/client": "0.20.0-alpha.6", - "@nocobase/test": "0.20.0-alpha.6", + "@nocobase/build": "0.20.0-alpha.7", + "@nocobase/client": "0.20.0-alpha.7", + "@nocobase/test": "0.20.0-alpha.7", "@types/koa": "^2.13.4", "@types/koa-bodyparser": "^4.3.4", "@types/lodash": "^4.14.177", diff --git a/packages/core/evaluators/package.json b/packages/core/evaluators/package.json index c57c58221..a0e5a5c2d 100644 --- a/packages/core/evaluators/package.json +++ b/packages/core/evaluators/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/evaluators", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", "dependencies": { "@formulajs/formulajs": "4.2.0", - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.7", "mathjs": "^10.6.0" }, "repository": { diff --git a/packages/core/logger/package.json b/packages/core/logger/package.json index eb2df74ab..3b0b9e897 100644 --- a/packages/core/logger/package.json +++ b/packages/core/logger/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/logger", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "nocobase logging library", "license": "Apache-2.0", "main": "./lib/index.js", diff --git a/packages/core/resourcer/package.json b/packages/core/resourcer/package.json index fa4d8f939..14b8d5430 100644 --- a/packages/core/resourcer/package.json +++ b/packages/core/resourcer/package.json @@ -1,12 +1,12 @@ { "name": "@nocobase/resourcer", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", "dependencies": { - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.7", "deepmerge": "^4.2.2", "koa-compose": "^4.1.0", "lodash": "^4.17.21", diff --git a/packages/core/sdk/package.json b/packages/core/sdk/package.json index 79b3c7407..7e35ac121 100644 --- a/packages/core/sdk/package.json +++ b/packages/core/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/sdk", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "Apache-2.0", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/core/server/package.json b/packages/core/server/package.json index 3c73bbb77..9bae9da33 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/server", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", @@ -10,18 +10,18 @@ "@koa/cors": "^3.1.0", "@koa/multer": "^3.0.2", "@koa/router": "^9.4.0", - "@nocobase/acl": "0.20.0-alpha.6", - "@nocobase/actions": "0.20.0-alpha.6", - "@nocobase/auth": "0.20.0-alpha.6", - "@nocobase/cache": "0.20.0-alpha.6", - "@nocobase/data-source-manager": "0.20.0-alpha.6", - "@nocobase/database": "0.20.0-alpha.6", - "@nocobase/evaluators": "0.20.0-alpha.6", - "@nocobase/logger": "0.20.0-alpha.6", - "@nocobase/resourcer": "0.20.0-alpha.6", - "@nocobase/sdk": "0.20.0-alpha.6", - "@nocobase/telemetry": "0.20.0-alpha.6", - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/acl": "0.20.0-alpha.7", + "@nocobase/actions": "0.20.0-alpha.7", + "@nocobase/auth": "0.20.0-alpha.7", + "@nocobase/cache": "0.20.0-alpha.7", + "@nocobase/data-source-manager": "0.20.0-alpha.7", + "@nocobase/database": "0.20.0-alpha.7", + "@nocobase/evaluators": "0.20.0-alpha.7", + "@nocobase/logger": "0.20.0-alpha.7", + "@nocobase/resourcer": "0.20.0-alpha.7", + "@nocobase/sdk": "0.20.0-alpha.7", + "@nocobase/telemetry": "0.20.0-alpha.7", + "@nocobase/utils": "0.20.0-alpha.7", "@types/decompress": "4.2.4", "@types/ini": "^1.3.31", "@types/koa-send": "^4.1.3", diff --git a/packages/core/telemetry/package.json b/packages/core/telemetry/package.json index a4f8d3867..ad5e458e8 100644 --- a/packages/core/telemetry/package.json +++ b/packages/core/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/telemetry", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "nocobase telemetry library", "license": "Apache-2.0", "main": "./lib/index.js", @@ -11,7 +11,7 @@ "directory": "packages/telemetry" }, "dependencies": { - "@nocobase/utils": "0.20.0-alpha.6", + "@nocobase/utils": "0.20.0-alpha.7", "@opentelemetry/api": "^1.7.0", "@opentelemetry/instrumentation": "^0.46.0", "@opentelemetry/resources": "^1.19.0", diff --git a/packages/core/test/package.json b/packages/core/test/package.json index fec382332..b2feafc00 100644 --- a/packages/core/test/package.json +++ b/packages/core/test/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/test", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "lib/index.js", "module": "./src/index.ts", "types": "./lib/index.d.ts", @@ -40,7 +40,7 @@ }, "dependencies": { "@faker-js/faker": "8.1.0", - "@nocobase/server": "0.20.0-alpha.6", + "@nocobase/server": "0.20.0-alpha.7", "@playwright/test": "^1.42.1", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index b6eb223d4..1ac45fdfc 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/utils", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", diff --git a/packages/plugins/@nocobase/plugin-acl/package.json b/packages/plugins/@nocobase/plugin-acl/package.json index 73539d451..d73f7de25 100644 --- a/packages/plugins/@nocobase/plugin-acl/package.json +++ b/packages/plugins/@nocobase/plugin-acl/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "权限控制", "description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.", "description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/acl", diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json index ddcc470cc..310dbcb7a 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-bulk-edit", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-bulk-edit", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-edit", diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/package.json b/packages/plugins/@nocobase/plugin-action-bulk-update/package.json index 5bea028b4..7d080c630 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/package.json +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-bulk-update", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-bulk-update", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-update", diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/package.json b/packages/plugins/@nocobase/plugin-action-duplicate/package.json index 2ca025e5d..979d4bede 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/package.json +++ b/packages/plugins/@nocobase/plugin-action-duplicate/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-duplicate", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-duplicate", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-duplicate", diff --git a/packages/plugins/@nocobase/plugin-action-print/package.json b/packages/plugins/@nocobase/plugin-action-print/package.json index d110fc88a..4d2af6959 100644 --- a/packages/plugins/@nocobase/plugin-action-print/package.json +++ b/packages/plugins/@nocobase/plugin-action-print/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-print", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-print", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-print", diff --git a/packages/plugins/@nocobase/plugin-api-doc/package.json b/packages/plugins/@nocobase/plugin-api-doc/package.json index 85332c454..e68c0f2e7 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/package.json +++ b/packages/plugins/@nocobase/plugin-api-doc/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-api-doc", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "displayName": "API documentation", "displayName.zh-CN": "API 文档", "description": "An OpenAPI documentation generator for NocoBase HTTP API.", diff --git a/packages/plugins/@nocobase/plugin-api-keys/package.json b/packages/plugins/@nocobase/plugin-api-keys/package.json index 4dad74ea0..97228d654 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/package.json +++ b/packages/plugins/@nocobase/plugin-api-keys/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:API 密钥", "description": "Allows users to use API key to access application's HTTP API", "description.zh-CN": "允许用户使用 API 密钥访问应用的 HTTP API", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/api-keys", diff --git a/packages/plugins/@nocobase/plugin-audit-logs/package.json b/packages/plugins/@nocobase/plugin-audit-logs/package.json index 2748a9efb..fc71c2065 100644 --- a/packages/plugins/@nocobase/plugin-audit-logs/package.json +++ b/packages/plugins/@nocobase/plugin-audit-logs/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-audit-logs", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "displayName": "Audit logs (deprecated)", "displayName.zh-CN": "审计日志(废弃)", "description": "This plugin is deprecated. There will be a new audit log plugin in the future.", diff --git a/packages/plugins/@nocobase/plugin-auth/package.json b/packages/plugins/@nocobase/plugin-auth/package.json index 60b84ae61..597001706 100644 --- a/packages/plugins/@nocobase/plugin-auth/package.json +++ b/packages/plugins/@nocobase/plugin-auth/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-auth", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth", diff --git a/packages/plugins/@nocobase/plugin-backup-restore/package.json b/packages/plugins/@nocobase/plugin-backup-restore/package.json index 3efcde599..cf9d055b5 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/package.json +++ b/packages/plugins/@nocobase/plugin-backup-restore/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "应用的备份与还原", "description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.", "description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/backup-restore", diff --git a/packages/plugins/@nocobase/plugin-calendar/package.json b/packages/plugins/@nocobase/plugin-calendar/package.json index 66d799b37..779066b7a 100644 --- a/packages/plugins/@nocobase/plugin-calendar/package.json +++ b/packages/plugins/@nocobase/plugin-calendar/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-calendar", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "displayName": "Calendar", "displayName.zh-CN": "日历", "description": "Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on.", diff --git a/packages/plugins/@nocobase/plugin-cas/package.json b/packages/plugins/@nocobase/plugin-cas/package.json index 47b4e36f7..085cc6606 100644 --- a/packages/plugins/@nocobase/plugin-cas/package.json +++ b/packages/plugins/@nocobase/plugin-cas/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:CAS", "description": "CAS authentication.", "description.zh-CN": "通过 CAS 协议认证身份。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-cas", diff --git a/packages/plugins/@nocobase/plugin-charts/package.json b/packages/plugins/@nocobase/plugin-charts/package.json index 6d16e20c2..260f66534 100644 --- a/packages/plugins/@nocobase/plugin-charts/package.json +++ b/packages/plugins/@nocobase/plugin-charts/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "图表(废弃)", "description": "The plugin has been deprecated, please use the data visualization plugin instead.", "description.zh-CN": "已废弃插件,请使用数据可视化插件代替。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-china-region/package.json b/packages/plugins/@nocobase/plugin-china-region/package.json index 628ebb515..419b8b791 100644 --- a/packages/plugins/@nocobase/plugin-china-region/package.json +++ b/packages/plugins/@nocobase/plugin-china-region/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-china-region", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "displayName": "Administrative divisions of China", "displayName.zh-CN": "中国行政区划", "description": "Provides data and field type for administrative divisions of China.", diff --git a/packages/plugins/@nocobase/plugin-client/package.json b/packages/plugins/@nocobase/plugin-client/package.json index e3c3dd91e..1b3769b30 100644 --- a/packages/plugins/@nocobase/plugin-client/package.json +++ b/packages/plugins/@nocobase/plugin-client/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "WEB 客户端", "description": "Provides a client interface for the NocoBase server", "description.zh-CN": "为 NocoBase 服务端提供客户端界面", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-collection-manager/package.json b/packages/plugins/@nocobase/plugin-collection-manager/package.json index f8a6f64ba..97b457a7b 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-collection-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据源:主数据库", "description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.", "description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/data-source-main", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main", diff --git a/packages/plugins/@nocobase/plugin-custom-request/package.json b/packages/plugins/@nocobase/plugin-custom-request/package.json index 0a61785e8..9ec72541a 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/package.json +++ b/packages/plugins/@nocobase/plugin-custom-request/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-custom-request", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-custom-request", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-custom-request", diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/package.json b/packages/plugins/@nocobase/plugin-data-source-manager/package.json index 8b6032b15..5e963303d 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/package.json +++ b/packages/plugins/@nocobase/plugin-data-source-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-data-source-manager", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "displayName": "Data source manager", "displayName.zh-CN": "数据源管理", diff --git a/packages/plugins/@nocobase/plugin-data-visualization/package.json b/packages/plugins/@nocobase/plugin-data-visualization/package.json index ed421f82e..59688fe46 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/package.json +++ b/packages/plugins/@nocobase/plugin-data-visualization/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-data-visualization", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "displayName": "Data visualization", "displayName.zh-CN": "数据可视化", "description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.", diff --git a/packages/plugins/@nocobase/plugin-disable-pm-add/package.json b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json index 9194928e9..0d49dfba0 100644 --- a/packages/plugins/@nocobase/plugin-disable-pm-add/package.json +++ b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-disable-pm-add", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "peerDependencies": { "@nocobase/client": "0.x", diff --git a/packages/plugins/@nocobase/plugin-error-handler/package.json b/packages/plugins/@nocobase/plugin-error-handler/package.json index 521024496..a32add70b 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/package.json +++ b/packages/plugins/@nocobase/plugin-error-handler/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "错误处理器", "description": "Handling application errors and exceptions.", "description.zh-CN": "处理应用程序中的错误和异常。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-excel-formula-field/package.json b/packages/plugins/@nocobase/plugin-excel-formula-field/package.json index 21e6570a8..0de7f40ae 100644 --- a/packages/plugins/@nocobase/plugin-excel-formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-excel-formula-field/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-excel-formula-field", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/@nocobase/plugin-export/package.json b/packages/plugins/@nocobase/plugin-export/package.json index ae4d0808f..8e9e4b2d7 100644 --- a/packages/plugins/@nocobase/plugin-export/package.json +++ b/packages/plugins/@nocobase/plugin-export/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "操作:导出记录", "description": "Export filtered records to excel, you can configure which fields to export.", "description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-export", diff --git a/packages/plugins/@nocobase/plugin-file-manager/package.json b/packages/plugins/@nocobase/plugin-file-manager/package.json index 53b78622d..f9f866beb 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/package.json +++ b/packages/plugins/@nocobase/plugin-file-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-file-manager", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "displayName": "File manager", "displayName.zh-CN": "文件管理器", "description": "Provides files storage services with files collection template and attachment field.", diff --git a/packages/plugins/@nocobase/plugin-formula-field/package.json b/packages/plugins/@nocobase/plugin-formula-field/package.json index 00289e011..8be84b9cb 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-formula-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:公式", "description": "Configure and store the results of calculations between multiple field values in the same record, supporting both Math.js and Excel formula functions.", "description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-formula", diff --git a/packages/plugins/@nocobase/plugin-gantt/package.json b/packages/plugins/@nocobase/plugin-gantt/package.json index b83c27998..bf0f36f49 100644 --- a/packages/plugins/@nocobase/plugin-gantt/package.json +++ b/packages/plugins/@nocobase/plugin-gantt/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-gantt", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "displayName": "Block: Gantt", "displayName.zh-CN": "区块:甘特图", "description": "Provides Gantt block.", diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json index c4c66564d..83fece90f 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "可视化数据表管理", "description": "An ER diagram-like tool. Currently only the Master database is supported.", "description.zh-CN": "类似 ER 图的工具,目前只支持主数据库。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/graph-collection-manager", diff --git a/packages/plugins/@nocobase/plugin-iframe-block/package.json b/packages/plugins/@nocobase/plugin-iframe-block/package.json index 67fe6f795..f4b7c1f59 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/package.json +++ b/packages/plugins/@nocobase/plugin-iframe-block/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "区块:iframe", "description": "Create an iframe block on the page to embed and display external web pages or content.", "description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/block-iframe", diff --git a/packages/plugins/@nocobase/plugin-import/package.json b/packages/plugins/@nocobase/plugin-import/package.json index 347040e9e..86f7afdc4 100644 --- a/packages/plugins/@nocobase/plugin-import/package.json +++ b/packages/plugins/@nocobase/plugin-import/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "操作:导入记录", "description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.", "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-import", diff --git a/packages/plugins/@nocobase/plugin-kanban/package.json b/packages/plugins/@nocobase/plugin-kanban/package.json index c92f1c710..e3104f627 100644 --- a/packages/plugins/@nocobase/plugin-kanban/package.json +++ b/packages/plugins/@nocobase/plugin-kanban/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-kanban", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/block-kanban", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/block-kanban", diff --git a/packages/plugins/@nocobase/plugin-localization-management/package.json b/packages/plugins/@nocobase/plugin-localization-management/package.json index 8453eddbb..ff87ccf89 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/package.json +++ b/packages/plugins/@nocobase/plugin-localization-management/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-localization-management", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/localization-management", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management", diff --git a/packages/plugins/@nocobase/plugin-logger/package.json b/packages/plugins/@nocobase/plugin-logger/package.json index 6f7902874..a3617c75f 100644 --- a/packages/plugins/@nocobase/plugin-logger/package.json +++ b/packages/plugins/@nocobase/plugin-logger/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "日志", "description": "Server-side logs, mainly including API request logs and system runtime logs, and allows to package and download log files.", "description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/logger", diff --git a/packages/plugins/@nocobase/plugin-map/package.json b/packages/plugins/@nocobase/plugin-map/package.json index c503efcbf..8e29b18d8 100644 --- a/packages/plugins/@nocobase/plugin-map/package.json +++ b/packages/plugins/@nocobase/plugin-map/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-map", "displayName": "Block: Map", "displayName.zh-CN": "区块:地图", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "Map block, support Gaode map and Google map, you can also extend more map types.", "description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。", "license": "AGPL-3.0", diff --git a/packages/plugins/@nocobase/plugin-math-formula-field/package.json b/packages/plugins/@nocobase/plugin-math-formula-field/package.json index a214d9641..1f67b4572 100644 --- a/packages/plugins/@nocobase/plugin-math-formula-field/package.json +++ b/packages/plugins/@nocobase/plugin-math-formula-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数学公式字段", "description": "A powerful mathematical formula field plugin designed to provide flexible mathematical and formula calculation capabilities for databases or data management systems. It seamlessly integrates with various database systems such as MySQL, PostgreSQL, and offers an intuitive user interface for defining and executing mathematical formula fields.", "description.zh-CN": "一个功能强大的数学公式字段插件,旨在为数据库或数据管理系统提供灵活的数学计算和公式计算功能。它可以与各种数据库系统(如MySQL、PostgreSQL)无缝集成,并提供直观的用户界面来定义和执行数学公式字段。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-mobile-client/package.json b/packages/plugins/@nocobase/plugin-mobile-client/package.json index 1183b310c..551cab72b 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/package.json +++ b/packages/plugins/@nocobase/plugin-mobile-client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-mobile-client", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/mobile-client", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client", diff --git a/packages/plugins/@nocobase/plugin-mock-collections/package.json b/packages/plugins/@nocobase/plugin-mock-collections/package.json index cb562d35b..ec697ff89 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/package.json +++ b/packages/plugins/@nocobase/plugin-mock-collections/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-mock-collections", "displayName": "mock-collections", "description": "mock-collections", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "license": "AGPL-3.0", "peerDependencies": { diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json index 57decb702..f1d477c1f 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "多应用管理器", "description": "Dynamically create multiple apps without separate deployments.", "description.zh-CN": "无需单独部署即可动态创建多个应用。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/multi-app-manager", diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json index 5dbc5a6c5..d851c768e 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "多应用数据表共享", "description": "", "description.zh-CN": "", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "devDependencies": { "@formily/react": "2.x", diff --git a/packages/plugins/@nocobase/plugin-notifications/package.json b/packages/plugins/@nocobase/plugin-notifications/package.json index ef82e5c81..50611a408 100644 --- a/packages/plugins/@nocobase/plugin-notifications/package.json +++ b/packages/plugins/@nocobase/plugin-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-notifications", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "description": "", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/@nocobase/plugin-oidc/package.json b/packages/plugins/@nocobase/plugin-oidc/package.json index 82b723a65..887060f3a 100644 --- a/packages/plugins/@nocobase/plugin-oidc/package.json +++ b/packages/plugins/@nocobase/plugin-oidc/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:OIDC", "description": "OIDC (OpenID Connect) authentication.", "description.zh-CN": "通过 OIDC (OpenID Connect) 协议认证身份。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-oidc", diff --git a/packages/plugins/@nocobase/plugin-saml/package.json b/packages/plugins/@nocobase/plugin-saml/package.json index 67f70dad3..a38fff2ad 100644 --- a/packages/plugins/@nocobase/plugin-saml/package.json +++ b/packages/plugins/@nocobase/plugin-saml/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:SAML 2.0", "description": "SAML 2.0 authentication.", "description.zh-CN": "通过 SAML 2.0 协议认证身份。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-saml", diff --git a/packages/plugins/@nocobase/plugin-sample-hello/package.json b/packages/plugins/@nocobase/plugin-sample-hello/package.json index d0b2a9544..466ef0830 100644 --- a/packages/plugins/@nocobase/plugin-sample-hello/package.json +++ b/packages/plugins/@nocobase/plugin-sample-hello/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-sample-hello", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "displayName": "Hello", "displayName.zh-CN": "Hello", diff --git a/packages/plugins/@nocobase/plugin-sequence-field/package.json b/packages/plugins/@nocobase/plugin-sequence-field/package.json index 7890173dc..bf8122cc9 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/package.json +++ b/packages/plugins/@nocobase/plugin-sequence-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:自动编码", "description": "Automatically generate codes based on configured rules, supporting combinations of dates, numbers, and text.", "description.zh-CN": "根据配置的规则自动生成编码,支持日期、数字、文本的组合。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-sequence", diff --git a/packages/plugins/@nocobase/plugin-sms-auth/package.json b/packages/plugins/@nocobase/plugin-sms-auth/package.json index 9242e66c5..6cc89e878 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/package.json +++ b/packages/plugins/@nocobase/plugin-sms-auth/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:短信", "description": "SMS authentication.", "description.zh-CN": "通过短信验证码认证身份。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-sms", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-sms", diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/package.json b/packages/plugins/@nocobase/plugin-snapshot-field/package.json index 6860cde70..6318777a7 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/package.json +++ b/packages/plugins/@nocobase/plugin-snapshot-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:关系快照", "description": "When adding a new record, create a snapshot for its relational record and save in the new record. The snapshot will not be updated when the relational record is updated.", "description.zh-CN": "在添加数据时,为它的关系数据创建快照,并保存在当前的数据中。关系数据更新时,快照不会更新。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-snapshot", diff --git a/packages/plugins/@nocobase/plugin-system-settings/package.json b/packages/plugins/@nocobase/plugin-system-settings/package.json index 9560965cd..39f903ec6 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/package.json +++ b/packages/plugins/@nocobase/plugin-system-settings/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "系统设置", "description": "Used to adjust the system title, logo, language, etc.", "description.zh-CN": "用于调整系统的标题、LOGO、语言等。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/system-settings", diff --git a/packages/plugins/@nocobase/plugin-theme-editor/package.json b/packages/plugins/@nocobase/plugin-theme-editor/package.json index 6c53b594c..998bb8140 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/package.json +++ b/packages/plugins/@nocobase/plugin-theme-editor/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-theme-editor", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/theme-editor", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/theme-editor", diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json b/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json index 8cfd5debd..eca94a334 100644 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json +++ b/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "路由管理", "description": "manage the routes of nocobase", "description.zh-CN": "管理页面路由。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json index a14b956b3..9bc20a71e 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "UI schema 存储服务", "description": "Provides centralized UI schema storage service.", "description.zh-CN": "提供中心化的 UI schema 存储服务。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/ui-schema-storage", diff --git a/packages/plugins/@nocobase/plugin-users/package.json b/packages/plugins/@nocobase/plugin-users/package.json index 015489a80..78ed95530 100644 --- a/packages/plugins/@nocobase/plugin-users/package.json +++ b/packages/plugins/@nocobase/plugin-users/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "用户", "description": "Provides basic user model, as well as created by and updated by fields.", "description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/users", diff --git a/packages/plugins/@nocobase/plugin-verification/package.json b/packages/plugins/@nocobase/plugin-verification/package.json index ca8d466e8..a2be45da8 100644 --- a/packages/plugins/@nocobase/plugin-verification/package.json +++ b/packages/plugins/@nocobase/plugin-verification/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "验证码", "description": "verification setting.", "description.zh-CN": "验证码配置。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/verification", diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json index 62722d695..66ef9d5bf 100644 --- a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:数据操作触发器", "description": "Bind action buttons to trigger workflow events when clicked.", "description.zh-CN": "可对数据操作按钮绑定,在点击后触发对应的工作流事件。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/plugins/workflow-action-trigger", diff --git a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json index b4420d80c..0a1f61bb5 100644 --- a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:聚合查询节点", "description": "Used to aggregate data against the database in workflow, such as: statistics, sum, average, etc.", "description.zh-CN": "可用于在工作流中对数据库进行聚合查询,如:统计数量、求和、平均值等。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-aggregate", diff --git a/packages/plugins/@nocobase/plugin-workflow-delay/package.json b/packages/plugins/@nocobase/plugin-workflow-delay/package.json index ae03d0e8d..37a245943 100644 --- a/packages/plugins/@nocobase/plugin-workflow-delay/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-delay/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:延时节点", "description": "Could be used in workflow parallel branch for waiting other branches.", "description.zh-CN": "可用于工作流并行分支中等待其他分支执行完成。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-delay", diff --git a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json index 2bd8a70f8..fc76530ae 100644 --- a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:动态表达式计算节点", "description": "Useful plugin for doing dynamic calculation based on expression collection records in workflow.", "description.zh-CN": "用于在工作流中进行基于数据行的动态表达式计算。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-dynamic-calculation", diff --git a/packages/plugins/@nocobase/plugin-workflow-loop/package.json b/packages/plugins/@nocobase/plugin-workflow-loop/package.json index ca9a0e67f..24b11a923 100644 --- a/packages/plugins/@nocobase/plugin-workflow-loop/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-loop/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:循环节点", "description": "Used to repeat the sub-process processing of each value in an array, and can also be used for fixed times of sub-process processing.", "description.zh-CN": "用于对一个数组中的每个值进行重复的子流程处理,也可用于固定次数的重复子流程处理。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-loop", diff --git a/packages/plugins/@nocobase/plugin-workflow-manual/package.json b/packages/plugins/@nocobase/plugin-workflow-manual/package.json index cb6541e72..f2d43b67e 100644 --- a/packages/plugins/@nocobase/plugin-workflow-manual/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-manual/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:人工处理节点", "description": "Could be used for workflows which some of decisions are made by users.", "description.zh-CN": "用于人工控制部分决策的流程。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-manual", diff --git a/packages/plugins/@nocobase/plugin-workflow-parallel/package.json b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json index ea5217db3..8bf29b209 100644 --- a/packages/plugins/@nocobase/plugin-workflow-parallel/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:并行分支节点", "description": "Could be used for parallel execution of branch processes in the workflow.", "description.zh-CN": "用于在工作流中需要并行执行的分支流程。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-parallel", diff --git a/packages/plugins/@nocobase/plugin-workflow-request/package.json b/packages/plugins/@nocobase/plugin-workflow-request/package.json index d0d295052..4b81b3aed 100644 --- a/packages/plugins/@nocobase/plugin-workflow-request/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-request/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:HTTP 请求节点", "description": "Send HTTP requests to any HTTP service for data interaction in workflow.", "description.zh-CN": "可用于在工作流中向任意 HTTP 服务发送请求,进行数据交互。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-request", diff --git a/packages/plugins/@nocobase/plugin-workflow-sql/package.json b/packages/plugins/@nocobase/plugin-workflow-sql/package.json index 6950dcbf6..1212286ae 100644 --- a/packages/plugins/@nocobase/plugin-workflow-sql/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-sql/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:SQL 节点", "description": "Execute SQL statements in workflow.", "description.zh-CN": "可用于在工作流中对数据库执行任意 SQL 语句。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-sql", diff --git a/packages/plugins/@nocobase/plugin-workflow-test/package.json b/packages/plugins/@nocobase/plugin-workflow-test/package.json index 4fe100ea0..c6418b747 100644 --- a/packages/plugins/@nocobase/plugin-workflow-test/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-test/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-workflow-test", "displayName": "Workflow: test kit", "displayName.zh-CN": "工作流:测试工具包", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "dist/server/index.js", "types": "./dist/server/index.d.ts", diff --git a/packages/plugins/@nocobase/plugin-workflow/package.json b/packages/plugins/@nocobase/plugin-workflow/package.json index 4b89c8bfe..2dcbf3d1f 100644 --- a/packages/plugins/@nocobase/plugin-workflow/package.json +++ b/packages/plugins/@nocobase/plugin-workflow/package.json @@ -4,13 +4,13 @@ "displayName.zh-CN": "工作流", "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.", "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow", "dependencies": { - "@nocobase/plugin-workflow-test": "0.20.0-alpha.6" + "@nocobase/plugin-workflow-test": "0.20.0-alpha.7" }, "devDependencies": { "@ant-design/icons": "5.x", diff --git a/packages/presets/nocobase/package.json b/packages/presets/nocobase/package.json index 3b80ae4ac..e5e5e7ec2 100644 --- a/packages/presets/nocobase/package.json +++ b/packages/presets/nocobase/package.json @@ -1,66 +1,66 @@ { "name": "@nocobase/preset-nocobase", - "version": "0.20.0-alpha.6", + "version": "0.20.0-alpha.7", "license": "AGPL-3.0", "main": "./lib/server/index.js", "dependencies": { "@formily/json-schema": "2.x", - "@nocobase/plugin-acl": "0.20.0-alpha.6", - "@nocobase/plugin-action-bulk-edit": "0.20.0-alpha.6", - "@nocobase/plugin-action-bulk-update": "0.20.0-alpha.6", - "@nocobase/plugin-action-duplicate": "0.20.0-alpha.6", - "@nocobase/plugin-action-print": "0.20.0-alpha.6", - "@nocobase/plugin-api-doc": "0.20.0-alpha.6", - "@nocobase/plugin-api-keys": "0.20.0-alpha.6", - "@nocobase/plugin-audit-logs": "0.20.0-alpha.6", - "@nocobase/plugin-auth": "0.20.0-alpha.6", - "@nocobase/plugin-backup-restore": "0.20.0-alpha.6", - "@nocobase/plugin-calendar": "0.20.0-alpha.6", - "@nocobase/plugin-cas": "0.20.0-alpha.6", - "@nocobase/plugin-charts": "0.20.0-alpha.6", - "@nocobase/plugin-china-region": "0.20.0-alpha.6", - "@nocobase/plugin-client": "0.20.0-alpha.6", - "@nocobase/plugin-collection-manager": "0.20.0-alpha.6", - "@nocobase/plugin-custom-request": "0.20.0-alpha.6", - "@nocobase/plugin-data-source-manager": "0.20.0-alpha.6", - "@nocobase/plugin-data-visualization": "0.20.0-alpha.6", - "@nocobase/plugin-error-handler": "0.20.0-alpha.6", - "@nocobase/plugin-export": "0.20.0-alpha.6", - "@nocobase/plugin-file-manager": "0.20.0-alpha.6", - "@nocobase/plugin-formula-field": "0.20.0-alpha.6", - "@nocobase/plugin-gantt": "0.20.0-alpha.6", - "@nocobase/plugin-graph-collection-manager": "0.20.0-alpha.6", - "@nocobase/plugin-iframe-block": "0.20.0-alpha.6", - "@nocobase/plugin-import": "0.20.0-alpha.6", - "@nocobase/plugin-kanban": "0.20.0-alpha.6", - "@nocobase/plugin-localization-management": "0.20.0-alpha.6", - "@nocobase/plugin-logger": "0.20.0-alpha.6", - "@nocobase/plugin-map": "0.20.0-alpha.6", - "@nocobase/plugin-mobile-client": "0.20.0-alpha.6", - "@nocobase/plugin-mock-collections": "0.20.0-alpha.6", - "@nocobase/plugin-multi-app-manager": "0.20.0-alpha.6", - "@nocobase/plugin-multi-app-share-collection": "0.20.0-alpha.6", - "@nocobase/plugin-oidc": "0.20.0-alpha.6", - "@nocobase/plugin-saml": "0.20.0-alpha.6", - "@nocobase/plugin-sequence-field": "0.20.0-alpha.6", - "@nocobase/plugin-sms-auth": "0.20.0-alpha.6", - "@nocobase/plugin-snapshot-field": "0.20.0-alpha.6", - "@nocobase/plugin-system-settings": "0.20.0-alpha.6", - "@nocobase/plugin-theme-editor": "0.20.0-alpha.6", - "@nocobase/plugin-ui-schema-storage": "0.20.0-alpha.6", - "@nocobase/plugin-users": "0.20.0-alpha.6", - "@nocobase/plugin-verification": "0.20.0-alpha.6", - "@nocobase/plugin-workflow": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-action-trigger": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-aggregate": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-delay": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-dynamic-calculation": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-loop": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-manual": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-parallel": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-request": "0.20.0-alpha.6", - "@nocobase/plugin-workflow-sql": "0.20.0-alpha.6", - "@nocobase/server": "0.20.0-alpha.6", + "@nocobase/plugin-acl": "0.20.0-alpha.7", + "@nocobase/plugin-action-bulk-edit": "0.20.0-alpha.7", + "@nocobase/plugin-action-bulk-update": "0.20.0-alpha.7", + "@nocobase/plugin-action-duplicate": "0.20.0-alpha.7", + "@nocobase/plugin-action-print": "0.20.0-alpha.7", + "@nocobase/plugin-api-doc": "0.20.0-alpha.7", + "@nocobase/plugin-api-keys": "0.20.0-alpha.7", + "@nocobase/plugin-audit-logs": "0.20.0-alpha.7", + "@nocobase/plugin-auth": "0.20.0-alpha.7", + "@nocobase/plugin-backup-restore": "0.20.0-alpha.7", + "@nocobase/plugin-calendar": "0.20.0-alpha.7", + "@nocobase/plugin-cas": "0.20.0-alpha.7", + "@nocobase/plugin-charts": "0.20.0-alpha.7", + "@nocobase/plugin-china-region": "0.20.0-alpha.7", + "@nocobase/plugin-client": "0.20.0-alpha.7", + "@nocobase/plugin-collection-manager": "0.20.0-alpha.7", + "@nocobase/plugin-custom-request": "0.20.0-alpha.7", + "@nocobase/plugin-data-source-manager": "0.20.0-alpha.7", + "@nocobase/plugin-data-visualization": "0.20.0-alpha.7", + "@nocobase/plugin-error-handler": "0.20.0-alpha.7", + "@nocobase/plugin-export": "0.20.0-alpha.7", + "@nocobase/plugin-file-manager": "0.20.0-alpha.7", + "@nocobase/plugin-formula-field": "0.20.0-alpha.7", + "@nocobase/plugin-gantt": "0.20.0-alpha.7", + "@nocobase/plugin-graph-collection-manager": "0.20.0-alpha.7", + "@nocobase/plugin-iframe-block": "0.20.0-alpha.7", + "@nocobase/plugin-import": "0.20.0-alpha.7", + "@nocobase/plugin-kanban": "0.20.0-alpha.7", + "@nocobase/plugin-localization-management": "0.20.0-alpha.7", + "@nocobase/plugin-logger": "0.20.0-alpha.7", + "@nocobase/plugin-map": "0.20.0-alpha.7", + "@nocobase/plugin-mobile-client": "0.20.0-alpha.7", + "@nocobase/plugin-mock-collections": "0.20.0-alpha.7", + "@nocobase/plugin-multi-app-manager": "0.20.0-alpha.7", + "@nocobase/plugin-multi-app-share-collection": "0.20.0-alpha.7", + "@nocobase/plugin-oidc": "0.20.0-alpha.7", + "@nocobase/plugin-saml": "0.20.0-alpha.7", + "@nocobase/plugin-sequence-field": "0.20.0-alpha.7", + "@nocobase/plugin-sms-auth": "0.20.0-alpha.7", + "@nocobase/plugin-snapshot-field": "0.20.0-alpha.7", + "@nocobase/plugin-system-settings": "0.20.0-alpha.7", + "@nocobase/plugin-theme-editor": "0.20.0-alpha.7", + "@nocobase/plugin-ui-schema-storage": "0.20.0-alpha.7", + "@nocobase/plugin-users": "0.20.0-alpha.7", + "@nocobase/plugin-verification": "0.20.0-alpha.7", + "@nocobase/plugin-workflow": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-action-trigger": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-aggregate": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-delay": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-dynamic-calculation": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-loop": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-manual": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-parallel": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-request": "0.20.0-alpha.7", + "@nocobase/plugin-workflow-sql": "0.20.0-alpha.7", + "@nocobase/server": "0.20.0-alpha.7", "cronstrue": "^2.11.0" }, "repository": { From 02dcb752cb5c5763da0db297eaec69b3fc879ce4 Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 8 Mar 2024 14:11:38 +0800 Subject: [PATCH 09/19] chore: update changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a0b567b2..51b98405e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +## [v0.20.0-alpha.7](https://github.com/nocobase/nocobase/compare/v0.20.0-alpha.6...v0.20.0-alpha.7) - 2024-03-08 + +### Merged + +- fix: view collection interface missing [`#3658`](https://github.com/nocobase/nocobase/pull/3658) +- fix: getCollection bug [`#3656`](https://github.com/nocobase/nocobase/pull/3656) + +### Commits + +- chore(versions): 😊 publish v0.20.0-alpha.7 [`63d1a8d`](https://github.com/nocobase/nocobase/commit/63d1a8d90ca30056f7dd48bc012c30590b727cb8) +- chore: update changelog [`12ba7cd`](https://github.com/nocobase/nocobase/commit/12ba7cd9d0c48dc7b7048ebb73bb93be79e41ac8) +- chore(ci): change branch of pro image [`8dbae24`](https://github.com/nocobase/nocobase/commit/8dbae24489a8f2dcb3fd055a89225454394501e7) + ## [v0.20.0-alpha.6](https://github.com/nocobase/nocobase/compare/v0.20.0-alpha.5...v0.20.0-alpha.6) - 2024-03-08 ### Merged From 0bb0396754e6dca1ee21dbcc0d65bad41243315e Mon Sep 17 00:00:00 2001 From: Junyi Date: Fri, 8 Mar 2024 17:29:35 +0800 Subject: [PATCH 10/19] fix(plugin-workflow): fix migration (#3654) --- ...40227172623-change-name.ts => 20240307215012-change-name.ts} | 2 +- ...40227172623-change-name.ts => 20240307214623-change-name.ts} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/migrations/{20240227172623-change-name.ts => 20240307215012-change-name.ts} (93%) rename packages/presets/nocobase/src/server/migrations/{20240227172623-change-name.ts => 20240307214623-change-name.ts} (89%) diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/migrations/20240227172623-change-name.ts b/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/migrations/20240307215012-change-name.ts similarity index 93% rename from packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/migrations/20240227172623-change-name.ts rename to packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/migrations/20240307215012-change-name.ts index b22e508ca..51251ce36 100644 --- a/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/migrations/20240227172623-change-name.ts +++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/migrations/20240307215012-change-name.ts @@ -1,7 +1,7 @@ import { Migration } from '@nocobase/server'; export default class extends Migration { - appVersion = '<0.20.0-alpha.6'; + appVersion = '<0.20.0-alpha.7'; on = 'afterSync'; async up() { const { db } = this.context; diff --git a/packages/presets/nocobase/src/server/migrations/20240227172623-change-name.ts b/packages/presets/nocobase/src/server/migrations/20240307214623-change-name.ts similarity index 89% rename from packages/presets/nocobase/src/server/migrations/20240227172623-change-name.ts rename to packages/presets/nocobase/src/server/migrations/20240307214623-change-name.ts index 7ed0bc992..83ddb9bb3 100644 --- a/packages/presets/nocobase/src/server/migrations/20240227172623-change-name.ts +++ b/packages/presets/nocobase/src/server/migrations/20240307214623-change-name.ts @@ -2,7 +2,7 @@ import { Migration } from '@nocobase/server'; export default class extends Migration { on = 'beforeLoad'; // 'beforeLoad' or 'afterLoad' - appVersion = '<0.20.0-alpha.6'; + appVersion = '<0.20.0-alpha.7'; async up() { await this.pm.repository.destroy({ From e7e37b3634085e6f32d613ece862467056b3f1d7 Mon Sep 17 00:00:00 2001 From: Chareice Date: Fri, 8 Mar 2024 20:38:01 +0800 Subject: [PATCH 11/19] chore(backup-restore): using ctime for Windows compatibility --- .../@nocobase/plugin-backup-restore/src/server/dumper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts index e129ea9ea..32fa2a3ab 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts @@ -73,7 +73,7 @@ export class Dumper extends AppMigrator { if (backupFileStat.isFile()) { return { name: fileName, - createdAt: backupFileStat.birthtime, + createdAt: backupFileStat.ctime, fileSize: humanFileSize(backupFileStat.size), status: 'ok', } as BackUpStatusOk; From 4b1a33912ed1b315cafda92f345c5804c488adea Mon Sep 17 00:00:00 2001 From: Chareice Date: Fri, 8 Mar 2024 20:51:51 +0800 Subject: [PATCH 12/19] fix: using root user in mysql app --- docker/app-mysql/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/app-mysql/docker-compose.yml b/docker/app-mysql/docker-compose.yml index 8b6c24a36..43351dfcd 100644 --- a/docker/app-mysql/docker-compose.yml +++ b/docker/app-mysql/docker-compose.yml @@ -14,7 +14,7 @@ services: - DB_DIALECT=mysql - DB_HOST=mysql - DB_DATABASE=nocobase - - DB_USER=nocobase + - DB_USER=root - DB_PASSWORD=nocobase - DB_TIMEZONE=+08:00 volumes: @@ -30,4 +30,4 @@ services: MYSQL_ROOT_PASSWORD: nocobase restart: always networks: - - nocobase \ No newline at end of file + - nocobase From 677eb152e0a987a1be8220809f2d7396d0bc1013 Mon Sep 17 00:00:00 2001 From: Junyi Date: Fri, 8 Mar 2024 21:06:10 +0800 Subject: [PATCH 13/19] fix(plugin-workflow-action-trigger): fix appends loading (#3659) * fix(plugin-workflow-action-trigger): fix appends loading * fix(plugin-workflow-action-trigger): fix test case --- .../src/server/ActionTrigger.ts | 41 +++++++---- .../src/server/__tests__/trigger.test.ts | 71 ++++++++++++++++++- 2 files changed, 98 insertions(+), 14 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/ActionTrigger.ts b/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/ActionTrigger.ts index 49df2c69a..d05b49876 100644 --- a/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/ActionTrigger.ts +++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/ActionTrigger.ts @@ -1,9 +1,14 @@ import { get } from 'lodash'; import { BelongsTo, HasOne } from 'sequelize'; import { Model, modelAssociationByKey } from '@nocobase/database'; +import { DefaultContext } from '@nocobase/server'; +import { ActionContext } from '@nocobase/resourcer'; +import { Next } from '@nocobase/actions'; import WorkflowPlugin, { Trigger, WorkflowModel, toJSON } from '@nocobase/plugin-workflow'; +interface Context extends ActionContext, DefaultContext {} + export default class extends Trigger { constructor(workflow: WorkflowPlugin) { super(workflow); @@ -11,7 +16,7 @@ export default class extends Trigger { workflow.app.resourcer.use(this.middleware); } - async triggerAction(context, next) { + async triggerAction(context: Context, next: Next) { const { triggerWorkflows } = context.action.params; if (!triggerWorkflows) { @@ -24,7 +29,7 @@ export default class extends Trigger { this.trigger(context); } - middleware = async (context, next) => { + middleware = async (context: Context, next: Next) => { const { resourceName, actionName, @@ -48,7 +53,7 @@ export default class extends Trigger { return this.trigger(context); }; - private async trigger(context) { + private async trigger(context: Context) { const { triggerWorkflows = '', values } = context.action.params; const { currentUser, currentRole } = context.state; @@ -59,17 +64,20 @@ export default class extends Trigger { const triggers = triggerWorkflows.split(',').map((trigger) => trigger.split('!')); const workflowRepo = this.workflow.db.getRepository('workflows'); - const workflows = await workflowRepo.find({ - filter: { - key: triggers.map((trigger) => trigger[0]), - current: true, - type: 'action', - enabled: true, - }, - }); + const workflows = ( + await workflowRepo.find({ + filter: { + key: triggers.map((trigger) => trigger[0]), + current: true, + type: 'action', + enabled: true, + }, + }) + ).filter((workflow) => Boolean(workflow.config.collection)); const syncGroup = []; const asyncGroup = []; for (const workflow of workflows) { + const { collection, appends = [] } = workflow.config; const trigger = triggers.find((trigger) => trigger[0] == workflow.key); const event = [workflow]; if (context.action.resourceName !== 'workflows') { @@ -90,7 +98,6 @@ export default class extends Trigger { } } } - const { collection, appends = [] } = workflow.config; const model = payload.constructor; if (payload instanceof Model) { if (collection !== model.collection.name) { @@ -107,7 +114,15 @@ export default class extends Trigger { event.push({ data: toJSON(payload), ...userInfo }); } } else { - const data = trigger[1] ? get(values, trigger[1]) : values; + const { model, repository } = context.db.getCollection(collection); + let data = trigger[1] ? get(values, trigger[1]) : values; + const pk = get(data, model.primaryKeyAttribute); + if (appends.length && pk != null) { + data = await repository.findOne({ + filterByTk: pk, + appends, + }); + } // this.workflow.trigger(workflow, { // data, // ...userInfo, diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/__tests__/trigger.test.ts b/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/__tests__/trigger.test.ts index 90f8db997..d30cc936a 100644 --- a/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/__tests__/trigger.test.ts +++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/__tests__/trigger.test.ts @@ -214,6 +214,7 @@ describe('workflow > action-trigger', () => { type: 'action', config: { collection: 'posts', + appends: ['createdBy'], }, }); @@ -238,6 +239,7 @@ describe('workflow > action-trigger', () => { const [e2] = await workflow.getExecutions(); expect(e2.status).toBe(EXECUTION_STATUS.RESOLVED); expect(e2.context.data).toHaveProperty('title', 't2'); + expect(e2.context.data).toHaveProperty('createdBy'); }); }); @@ -281,7 +283,7 @@ describe('workflow > action-trigger', () => { }); describe('directly trigger', () => { - it('trigger data', async () => { + it('no collection configured should not be triggered', async () => { const workflow = await WorkflowModel.create({ enabled: true, type: 'action', @@ -295,20 +297,78 @@ describe('workflow > action-trigger', () => { await sleep(500); + const e1s = await workflow.getExecutions(); + expect(e1s.length).toBe(0); + }); + + it('trigger on form data', async () => { + const workflow = await WorkflowModel.create({ + enabled: true, + type: 'action', + config: { + collection: 'posts', + appends: ['createdBy'], + }, + }); + + const res1 = await userAgents[0].resource('workflows').trigger({ + values: { title: 't1' }, + triggerWorkflows: `${workflow.key}`, + }); + expect(res1.status).toBe(202); + + await sleep(500); + const [e1] = await workflow.getExecutions(); expect(e1.status).toBe(EXECUTION_STATUS.RESOLVED); expect(e1.context.data).toMatchObject({ title: 't1' }); + expect(e1.context.data.createdBy).toBeUndefined(); + }); + + it('trigger on record data', async () => { + const workflow = await WorkflowModel.create({ + enabled: true, + type: 'action', + config: { + collection: 'posts', + appends: ['createdBy'], + }, + }); + + const post = await PostRepo.create({ + values: { title: 't1', createdBy: users[0].id }, + }); + + const res1 = await userAgents[0].resource('workflows').trigger({ + values: post.toJSON(), + triggerWorkflows: `${workflow.key}`, + }); + expect(res1.status).toBe(202); + + await sleep(500); + + const [e1] = await workflow.getExecutions(); + expect(e1.status).toBe(EXECUTION_STATUS.RESOLVED); + expect(e1.context.data).toMatchObject({ title: 't1' }); + expect(e1.context.data).toHaveProperty('createdBy'); + expect(e1.context.data.createdBy.id).toBe(users[0].id); }); it('multi trigger', async () => { const w1 = await WorkflowModel.create({ enabled: true, type: 'action', + config: { + collection: 'posts', + }, }); const w2 = await WorkflowModel.create({ enabled: true, type: 'action', + config: { + collection: 'posts', + }, }); const res1 = await userAgents[0].resource('workflows').trigger({ @@ -358,6 +418,9 @@ describe('workflow > action-trigger', () => { const workflow = await WorkflowModel.create({ enabled: true, type: 'action', + config: { + collection: 'posts', + }, }); const res1 = await userAgents[0].resource('workflows').trigger({ @@ -377,6 +440,9 @@ describe('workflow > action-trigger', () => { const workflow = await WorkflowModel.create({ enabled: true, type: 'action', + config: { + collection: 'posts', + }, }); const res1 = await userAgents[0].resource('workflows').trigger({ @@ -398,6 +464,9 @@ describe('workflow > action-trigger', () => { const w1 = await WorkflowModel.create({ enabled: true, type: 'action', + config: { + collection: 'posts', + }, }); const res1 = await userAgents[0].resource('workflows').trigger({ From 46daba1e6e22f5c600d1cf67d00f7412c9ae79dd Mon Sep 17 00:00:00 2001 From: ChengLei Shao Date: Sat, 9 Mar 2024 10:08:32 +0800 Subject: [PATCH 14/19] fix: infer postgres field (#3663) --- .../database/src/__tests__/view/view-inference.test.ts | 2 +- .../src/query-interface/postgres-query-interface.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/core/database/src/__tests__/view/view-inference.test.ts b/packages/core/database/src/__tests__/view/view-inference.test.ts index 8294bfba4..33b56de94 100644 --- a/packages/core/database/src/__tests__/view/view-inference.test.ts +++ b/packages/core/database/src/__tests__/view/view-inference.test.ts @@ -34,7 +34,7 @@ describe('view inference', function () { await db.sync(); - const viewName = 'user_posts'; + const viewName = 'test_view'; const dropViewSQL = `DROP VIEW IF EXISTS ${viewName}`; await db.sequelize.query(dropViewSQL); diff --git a/packages/core/database/src/query-interface/postgres-query-interface.ts b/packages/core/database/src/query-interface/postgres-query-interface.ts index 5e973dc38..183c4465c 100644 --- a/packages/core/database/src/query-interface/postgres-query-interface.ts +++ b/packages/core/database/src/query-interface/postgres-query-interface.ts @@ -153,10 +153,14 @@ export default class PostgresQueryInterface extends QueryInterface { // handle column alias const from = ast[0].from; - const findAs = from.find((from) => from.as === columnExprTable); + if (columnExprTable === null && column.expr.type === 'column_ref') { + columnExprTable = from[0].table; + } else { + const findAs = from.find((from) => from.as === columnExprTable); - if (findAs) { - columnExprTable = findAs.table; + if (findAs) { + columnExprTable = findAs.table; + } } return columnUsage.column_name === column.expr.column && columnUsage.table_name === columnExprTable; From dd5b026ee9256eddcb78451e4222993e13f1209e Mon Sep 17 00:00:00 2001 From: YANG QIA <2013xile@gmail.com> Date: Sat, 9 Mar 2024 11:13:09 +0800 Subject: [PATCH 15/19] fix(auth): cas service validate issue (#3661) --- .../plugin-cas/src/server/actions/login.ts | 8 +- .../@nocobase/plugin-cas/src/server/auth.ts | 27 +++- yarn.lock | 139 ++++++++++++++++-- 3 files changed, 153 insertions(+), 21 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts b/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts index 51ab5e99c..d35df9ca2 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts +++ b/packages/plugins/@nocobase/plugin-cas/src/server/actions/login.ts @@ -2,12 +2,10 @@ import { Context, Next } from '@nocobase/actions'; import { CASAuth } from '../auth'; export const login = async (ctx: Context, next: Next) => { - const { authenticator, redirect = '' } = ctx.action.params; + const { authenticator, redirect = '/admin' } = ctx.action.params; const auth = (await ctx.app.authManager.get(authenticator, ctx)) as CASAuth; - const { casUrl, serviceUrl } = auth.getOptions(); - const service = encodeURIComponent( - `${serviceUrl}?authenticator=${authenticator}&__appName=${ctx.app.name}&redirect=${redirect}`, - ); + const { casUrl } = auth.getOptions(); + const service = auth.getService(authenticator, ctx.app.name, redirect); ctx.redirect(`${casUrl}/login?service=${service}`); next(); }; diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts b/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts index 488ce14e4..3a07dc947 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts +++ b/packages/plugins/@nocobase/plugin-cas/src/server/auth.ts @@ -11,21 +11,33 @@ export class CASAuth extends BaseAuth { }); } - getOptions() { + getOptions(): { + casUrl?: string; + serviceUrl?: string; + autoSignup?: boolean; + } { const opts = this.options || {}; return { ...opts, serviceUrl: `${opts.serviceDomain}/api/cas:service`, - } as { - casUrl?: string; - serviceUrl?: string; - autoSignup?: boolean; }; } + getService(authenticator: string, appName: string, redirect: string) { + const { serviceUrl } = this.getOptions(); + return encodeURIComponent(`${serviceUrl}?authenticator=${authenticator}&__appName=${appName}&redirect=${redirect}`); + } + async serviceValidate(ticket: string) { - const { casUrl, serviceUrl } = this.getOptions(); - const url = `${casUrl}/serviceValidate?ticket=${ticket}&service=${serviceUrl}`; + const { casUrl } = this.getOptions(); + const { authenticator, __appName: appName, redirect = '/admin' } = this.ctx.action.params; + const service = this.getService(authenticator, appName, redirect); + const url = `${casUrl}/serviceValidate?ticket=${ticket}&service=${service}`; + this.ctx.logger.debug(`serviceValidate url: ${url}`, { + module: 'auth', + submodule: 'cas', + method: 'serviceValidate', + }); try { const res = await axios.get(url); return res; @@ -42,6 +54,7 @@ export class CASAuth extends BaseAuth { throw new Error('Missing ticket'); } const res = await this.serviceValidate(ticket); + ctx.logger.debug(res?.data, { module: 'auth', submodule: 'cas', method: 'validate' }); const pattern = /<(?:cas|sso):user>(.*?)<\/(?:cas|sso):user>/; const username = res?.data.match(pattern)?.[1]; if (!username) { diff --git a/yarn.lock b/yarn.lock index 5110e39b7..486e00c98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4507,6 +4507,15 @@ dependencies: "@opentelemetry/semantic-conventions" "1.19.0" +"@opentelemetry/exporter-prometheus@^0.46.0": + version "0.46.0" + resolved "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.46.0.tgz#c411a1e8a5266f9f3ddc44a088a538c3c1ee4830" + integrity sha512-AXcoCHG31K2PLGizlJJWcfQqZsGfUZkT7ik6C8VJu7U2Cenk0Xhvd3rO+vVNSSjP1+LHkP4MQtqEXpIZttw5cw== + dependencies: + "@opentelemetry/core" "1.19.0" + "@opentelemetry/resources" "1.19.0" + "@opentelemetry/sdk-metrics" "1.19.0" + "@opentelemetry/instrumentation@^0.46.0": version "0.46.0" resolved "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.46.0.tgz#a8a252306f82e2eace489312798592a14eb9830e" @@ -4540,7 +4549,7 @@ "@opentelemetry/core" "1.19.0" "@opentelemetry/semantic-conventions" "1.19.0" -"@opentelemetry/sdk-metrics@^1.19.0": +"@opentelemetry/sdk-metrics@1.19.0", "@opentelemetry/sdk-metrics@^1.19.0": version "1.19.0" resolved "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.19.0.tgz#fe8029af29402563eb8dba75a85fc02006ea92c4" integrity sha512-FiMii40zr0Fmys4F1i8gmuCvbinBnBsDeGBr4FQemOf0iPCLytYQm5AZJ/nn4xSc71IgKBQwTFQRAGJI7JvZ4Q== @@ -6430,6 +6439,15 @@ dependencies: "@types/express" "*" +"@types/pg@^8.10.9": + version "8.11.2" + resolved "https://registry.npmjs.org/@types/pg/-/pg-8.11.2.tgz#e5c306601d2e0cc54c0801cc61a41761c8a95c92" + integrity sha512-G2Mjygf2jFMU/9hCaTYxJrwdObdcnuQde1gndooZSOHsNSaCehAuwc7EIuSA34Do8Jx2yZ19KtvW8P0j4EuUXw== + dependencies: + "@types/node" "*" + pg-protocol "*" + pg-types "^4.0.1" + "@types/picomatch@*": version "2.3.3" resolved "https://registry.npmmirror.com/@types/picomatch/-/picomatch-2.3.3.tgz#be60498568c19e989e43fb39aa84be1ed3655e92" @@ -8569,7 +8587,7 @@ bessel@^1.0.2: resolved "https://registry.npmmirror.com/bessel/-/bessel-1.0.2.tgz#828812291e0b62e94959cdea43fac186e8a7202d" integrity sha512-Al3nHGQGqDYqqinXhQzmwmcRToe/3WyBv4N8aZc5Pef8xw2neZlR9VPi84Sa23JtgWcucu18HxVZrnI0fn2etw== -big-integer@^1.6.44: +big-integer@^1.6.44, big-integer@^1.6.48: version "1.6.52" resolved "https://registry.npmmirror.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== @@ -11375,7 +11393,7 @@ delegates@^1.0.0: resolved "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -denque@^2.0.1: +denque@^2.0.1, denque@^2.1.0: version "2.1.0" resolved "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== @@ -15916,6 +15934,11 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" +jmespath@^0.16.0: + version "0.16.0" + resolved "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076" + integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw== + jose@^4.15.1: version "4.15.4" resolved "https://registry.npmmirror.com/jose/-/jose-4.15.4.tgz#02a9a763803e3872cf55f29ecef0dfdcc218cc03" @@ -16105,6 +16128,11 @@ json5@^2.1.2, json5@^2.2.2, json5@^2.2.3: resolved "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonata@^2.0.3: + version "2.0.4" + resolved "https://registry.npmjs.org/jsonata/-/jsonata-2.0.4.tgz#d8575d4c7695a2086162a2baebce0f0ee4e84fdb" + integrity sha512-vfavX4/G/yrYxE+UrmT/oUJ3ph7KqUrb0R7b0LVRcntQwxw+Z5kA1pNUIQzX5hF04Oe1eKxyoIPsmXtc2LgJTQ== + jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" @@ -16138,6 +16166,11 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.npmmirror.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== +jsonpath-plus@^7.2.0: + version "7.2.0" + resolved "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899" + integrity sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA== + jsonwebtoken@^8.5.1: version "8.5.1" resolved "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" @@ -16909,7 +16942,7 @@ long@^4.0.0: resolved "https://registry.npmmirror.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -long@^5.2.0: +long@^5.2.0, long@^5.2.1: version "5.2.3" resolved "https://registry.npmmirror.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== @@ -16955,7 +16988,7 @@ lowercase-keys@^2.0.0: resolved "https://registry.npmmirror.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@8.0.5: +lru-cache@8.0.5, lru-cache@^8.0.0: version "8.0.5" resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-8.0.5.tgz#983fe337f3e176667f8e567cfcce7cb064ea214e" integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== @@ -18329,6 +18362,20 @@ mysql2@^2.3.3: seq-queue "^0.0.5" sqlstring "^2.3.2" +mysql2@^3.9.1: + version "3.9.2" + resolved "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz#567343581f9742032598b6c15bd7aa65d2f7d4af" + integrity sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw== + dependencies: + denque "^2.1.0" + generate-function "^2.3.1" + iconv-lite "^0.6.3" + long "^5.2.1" + lru-cache "^8.0.0" + named-placeholders "^1.1.3" + seq-queue "^0.0.5" + sqlstring "^2.3.2" + mz@^2.7.0: version "2.7.0" resolved "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -18338,7 +18385,7 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -named-placeholders@^1.1.2: +named-placeholders@^1.1.2, named-placeholders@^1.1.3: version "1.1.3" resolved "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351" integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== @@ -18570,6 +18617,13 @@ node-releases@^2.0.14: resolved "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-sql-parser@^4.11.0: + version "4.18.0" + resolved "https://registry.npmjs.org/node-sql-parser/-/node-sql-parser-4.18.0.tgz#516b6e633c55c5abbba1ca588ab372db81ae9318" + integrity sha512-2YEOR5qlI1zUFbGMLKNfsrR5JUvFg9LxIRVE+xJe962pfVLH0rnItqLzv96XVs1Y1UIR8FxsXAuvX/lYAWZ2BQ== + dependencies: + big-integer "^1.6.48" + node-xlsx@^0.16.1: version "0.16.2" resolved "https://registry.npmmirror.com/node-xlsx/-/node-xlsx-0.16.2.tgz#40f580187eae0e032cac96e958e97cb6ceca09f6" @@ -19033,7 +19087,7 @@ object.values@^1.1.6, object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -obuf@^1.0.0, obuf@^1.1.2: +obuf@^1.0.0, obuf@^1.1.2, obuf@~1.1.2: version "1.1.2" resolved "https://registry.npmmirror.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== @@ -19862,12 +19916,17 @@ pg-int8@1.0.1: resolved "https://registry.npmmirror.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== +pg-numeric@1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz#816d9a44026086ae8ae74839acd6a09b0636aa3a" + integrity sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw== + pg-pool@^3.6.1: version "3.6.1" resolved "https://registry.npmmirror.com/pg-pool/-/pg-pool-3.6.1.tgz#5a902eda79a8d7e3c928b77abf776b3cb7d351f7" integrity sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og== -pg-protocol@^1.6.0: +pg-protocol@*, pg-protocol@^1.6.0: version "1.6.0" resolved "https://registry.npmmirror.com/pg-protocol/-/pg-protocol-1.6.0.tgz#4c91613c0315349363af2084608db843502f8833" integrity sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q== @@ -19883,7 +19942,20 @@ pg-types@^2.1.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg@^8.7.3: +pg-types@^4.0.1: + version "4.0.2" + resolved "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz#399209a57c326f162461faa870145bb0f918b76d" + integrity sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng== + dependencies: + pg-int8 "1.0.1" + pg-numeric "1.0.2" + postgres-array "~3.0.1" + postgres-bytea "~3.0.0" + postgres-date "~2.1.0" + postgres-interval "^3.0.0" + postgres-range "^1.1.1" + +pg@^8.11.3, pg@^8.7.3: version "8.11.3" resolved "https://registry.npmmirror.com/pg/-/pg-8.11.3.tgz#d7db6e3fe268fcedd65b8e4599cda0b8b4bf76cb" integrity sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g== @@ -20481,16 +20553,33 @@ postgres-array@~2.0.0: resolved "https://registry.npmmirror.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== +postgres-array@~3.0.1: + version "3.0.2" + resolved "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz#68d6182cb0f7f152a7e60dc6a6889ed74b0a5f98" + integrity sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog== + postgres-bytea@~1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== +postgres-bytea@~3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz#9048dc461ac7ba70a6a42d109221619ecd1cb089" + integrity sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw== + dependencies: + obuf "~1.1.2" + postgres-date@~1.0.4: version "1.0.7" resolved "https://registry.npmmirror.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== +postgres-date@~2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz#b85d3c1fb6fb3c6c8db1e9942a13a3bf625189d0" + integrity sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA== + postgres-interval@^1.1.0: version "1.2.0" resolved "https://registry.npmmirror.com/postgres-interval/-/postgres-interval-1.2.0.tgz#b460c82cb1587507788819a06aa0fffdb3544695" @@ -20498,6 +20587,16 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" +postgres-interval@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz#baf7a8b3ebab19b7f38f07566c7aab0962f0c86a" + integrity sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw== + +postgres-range@^1.1.1: + version "1.1.4" + resolved "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" + integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -22766,6 +22865,28 @@ sequelize@^6.26.0: validator "^13.9.0" wkx "^0.5.0" +sequelize@^6.35.0: + version "6.37.1" + resolved "https://registry.npmjs.org/sequelize/-/sequelize-6.37.1.tgz#9380fe0a3b5ff17638d3fce30c3cf3a2396c2343" + integrity sha512-vIKKzQ9dGp2aBOxQRD1FmUYViuQiKXSJ8yah8TsaBx4U3BokJt+Y2A0qz2C4pj08uX59qpWxRqSLEfRmVOEgQw== + dependencies: + "@types/debug" "^4.1.8" + "@types/validator" "^13.7.17" + debug "^4.3.4" + dottie "^2.0.6" + inflection "^1.13.4" + lodash "^4.17.21" + moment "^2.29.4" + moment-timezone "^0.5.43" + pg-connection-string "^2.6.1" + retry-as-promised "^7.0.4" + semver "^7.5.4" + sequelize-pool "^7.1.0" + toposort-class "^1.0.1" + uuid "^8.3.2" + validator "^13.9.0" + wkx "^0.5.0" + serve-handler@6.1.3: version "6.1.3" resolved "https://registry.npmmirror.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" From eae5a87ebd4ba5b58d2fa64aeaf316dacc37ed89 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Sat, 9 Mar 2024 15:22:43 +0800 Subject: [PATCH 16/19] chore: update yarn.lock --- yarn.lock | 139 ++++-------------------------------------------------- 1 file changed, 9 insertions(+), 130 deletions(-) diff --git a/yarn.lock b/yarn.lock index 486e00c98..5110e39b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4507,15 +4507,6 @@ dependencies: "@opentelemetry/semantic-conventions" "1.19.0" -"@opentelemetry/exporter-prometheus@^0.46.0": - version "0.46.0" - resolved "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.46.0.tgz#c411a1e8a5266f9f3ddc44a088a538c3c1ee4830" - integrity sha512-AXcoCHG31K2PLGizlJJWcfQqZsGfUZkT7ik6C8VJu7U2Cenk0Xhvd3rO+vVNSSjP1+LHkP4MQtqEXpIZttw5cw== - dependencies: - "@opentelemetry/core" "1.19.0" - "@opentelemetry/resources" "1.19.0" - "@opentelemetry/sdk-metrics" "1.19.0" - "@opentelemetry/instrumentation@^0.46.0": version "0.46.0" resolved "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.46.0.tgz#a8a252306f82e2eace489312798592a14eb9830e" @@ -4549,7 +4540,7 @@ "@opentelemetry/core" "1.19.0" "@opentelemetry/semantic-conventions" "1.19.0" -"@opentelemetry/sdk-metrics@1.19.0", "@opentelemetry/sdk-metrics@^1.19.0": +"@opentelemetry/sdk-metrics@^1.19.0": version "1.19.0" resolved "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.19.0.tgz#fe8029af29402563eb8dba75a85fc02006ea92c4" integrity sha512-FiMii40zr0Fmys4F1i8gmuCvbinBnBsDeGBr4FQemOf0iPCLytYQm5AZJ/nn4xSc71IgKBQwTFQRAGJI7JvZ4Q== @@ -6439,15 +6430,6 @@ dependencies: "@types/express" "*" -"@types/pg@^8.10.9": - version "8.11.2" - resolved "https://registry.npmjs.org/@types/pg/-/pg-8.11.2.tgz#e5c306601d2e0cc54c0801cc61a41761c8a95c92" - integrity sha512-G2Mjygf2jFMU/9hCaTYxJrwdObdcnuQde1gndooZSOHsNSaCehAuwc7EIuSA34Do8Jx2yZ19KtvW8P0j4EuUXw== - dependencies: - "@types/node" "*" - pg-protocol "*" - pg-types "^4.0.1" - "@types/picomatch@*": version "2.3.3" resolved "https://registry.npmmirror.com/@types/picomatch/-/picomatch-2.3.3.tgz#be60498568c19e989e43fb39aa84be1ed3655e92" @@ -8587,7 +8569,7 @@ bessel@^1.0.2: resolved "https://registry.npmmirror.com/bessel/-/bessel-1.0.2.tgz#828812291e0b62e94959cdea43fac186e8a7202d" integrity sha512-Al3nHGQGqDYqqinXhQzmwmcRToe/3WyBv4N8aZc5Pef8xw2neZlR9VPi84Sa23JtgWcucu18HxVZrnI0fn2etw== -big-integer@^1.6.44, big-integer@^1.6.48: +big-integer@^1.6.44: version "1.6.52" resolved "https://registry.npmmirror.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== @@ -11393,7 +11375,7 @@ delegates@^1.0.0: resolved "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -denque@^2.0.1, denque@^2.1.0: +denque@^2.0.1: version "2.1.0" resolved "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== @@ -15934,11 +15916,6 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jmespath@^0.16.0: - version "0.16.0" - resolved "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076" - integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw== - jose@^4.15.1: version "4.15.4" resolved "https://registry.npmmirror.com/jose/-/jose-4.15.4.tgz#02a9a763803e3872cf55f29ecef0dfdcc218cc03" @@ -16128,11 +16105,6 @@ json5@^2.1.2, json5@^2.2.2, json5@^2.2.3: resolved "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonata@^2.0.3: - version "2.0.4" - resolved "https://registry.npmjs.org/jsonata/-/jsonata-2.0.4.tgz#d8575d4c7695a2086162a2baebce0f0ee4e84fdb" - integrity sha512-vfavX4/G/yrYxE+UrmT/oUJ3ph7KqUrb0R7b0LVRcntQwxw+Z5kA1pNUIQzX5hF04Oe1eKxyoIPsmXtc2LgJTQ== - jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" @@ -16166,11 +16138,6 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.npmmirror.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonpath-plus@^7.2.0: - version "7.2.0" - resolved "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899" - integrity sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA== - jsonwebtoken@^8.5.1: version "8.5.1" resolved "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" @@ -16942,7 +16909,7 @@ long@^4.0.0: resolved "https://registry.npmmirror.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -long@^5.2.0, long@^5.2.1: +long@^5.2.0: version "5.2.3" resolved "https://registry.npmmirror.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== @@ -16988,7 +16955,7 @@ lowercase-keys@^2.0.0: resolved "https://registry.npmmirror.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@8.0.5, lru-cache@^8.0.0: +lru-cache@8.0.5: version "8.0.5" resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-8.0.5.tgz#983fe337f3e176667f8e567cfcce7cb064ea214e" integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== @@ -18362,20 +18329,6 @@ mysql2@^2.3.3: seq-queue "^0.0.5" sqlstring "^2.3.2" -mysql2@^3.9.1: - version "3.9.2" - resolved "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz#567343581f9742032598b6c15bd7aa65d2f7d4af" - integrity sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw== - dependencies: - denque "^2.1.0" - generate-function "^2.3.1" - iconv-lite "^0.6.3" - long "^5.2.1" - lru-cache "^8.0.0" - named-placeholders "^1.1.3" - seq-queue "^0.0.5" - sqlstring "^2.3.2" - mz@^2.7.0: version "2.7.0" resolved "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -18385,7 +18338,7 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -named-placeholders@^1.1.2, named-placeholders@^1.1.3: +named-placeholders@^1.1.2: version "1.1.3" resolved "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351" integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== @@ -18617,13 +18570,6 @@ node-releases@^2.0.14: resolved "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== -node-sql-parser@^4.11.0: - version "4.18.0" - resolved "https://registry.npmjs.org/node-sql-parser/-/node-sql-parser-4.18.0.tgz#516b6e633c55c5abbba1ca588ab372db81ae9318" - integrity sha512-2YEOR5qlI1zUFbGMLKNfsrR5JUvFg9LxIRVE+xJe962pfVLH0rnItqLzv96XVs1Y1UIR8FxsXAuvX/lYAWZ2BQ== - dependencies: - big-integer "^1.6.48" - node-xlsx@^0.16.1: version "0.16.2" resolved "https://registry.npmmirror.com/node-xlsx/-/node-xlsx-0.16.2.tgz#40f580187eae0e032cac96e958e97cb6ceca09f6" @@ -19087,7 +19033,7 @@ object.values@^1.1.6, object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -obuf@^1.0.0, obuf@^1.1.2, obuf@~1.1.2: +obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.npmmirror.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== @@ -19916,17 +19862,12 @@ pg-int8@1.0.1: resolved "https://registry.npmmirror.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-numeric@1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz#816d9a44026086ae8ae74839acd6a09b0636aa3a" - integrity sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw== - pg-pool@^3.6.1: version "3.6.1" resolved "https://registry.npmmirror.com/pg-pool/-/pg-pool-3.6.1.tgz#5a902eda79a8d7e3c928b77abf776b3cb7d351f7" integrity sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og== -pg-protocol@*, pg-protocol@^1.6.0: +pg-protocol@^1.6.0: version "1.6.0" resolved "https://registry.npmmirror.com/pg-protocol/-/pg-protocol-1.6.0.tgz#4c91613c0315349363af2084608db843502f8833" integrity sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q== @@ -19942,20 +19883,7 @@ pg-types@^2.1.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg-types@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz#399209a57c326f162461faa870145bb0f918b76d" - integrity sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng== - dependencies: - pg-int8 "1.0.1" - pg-numeric "1.0.2" - postgres-array "~3.0.1" - postgres-bytea "~3.0.0" - postgres-date "~2.1.0" - postgres-interval "^3.0.0" - postgres-range "^1.1.1" - -pg@^8.11.3, pg@^8.7.3: +pg@^8.7.3: version "8.11.3" resolved "https://registry.npmmirror.com/pg/-/pg-8.11.3.tgz#d7db6e3fe268fcedd65b8e4599cda0b8b4bf76cb" integrity sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g== @@ -20553,33 +20481,16 @@ postgres-array@~2.0.0: resolved "https://registry.npmmirror.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== -postgres-array@~3.0.1: - version "3.0.2" - resolved "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz#68d6182cb0f7f152a7e60dc6a6889ed74b0a5f98" - integrity sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog== - postgres-bytea@~1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== -postgres-bytea@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz#9048dc461ac7ba70a6a42d109221619ecd1cb089" - integrity sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw== - dependencies: - obuf "~1.1.2" - postgres-date@~1.0.4: version "1.0.7" resolved "https://registry.npmmirror.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== -postgres-date@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz#b85d3c1fb6fb3c6c8db1e9942a13a3bf625189d0" - integrity sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA== - postgres-interval@^1.1.0: version "1.2.0" resolved "https://registry.npmmirror.com/postgres-interval/-/postgres-interval-1.2.0.tgz#b460c82cb1587507788819a06aa0fffdb3544695" @@ -20587,16 +20498,6 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" -postgres-interval@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz#baf7a8b3ebab19b7f38f07566c7aab0962f0c86a" - integrity sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw== - -postgres-range@^1.1.1: - version "1.1.4" - resolved "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863" - integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -22865,28 +22766,6 @@ sequelize@^6.26.0: validator "^13.9.0" wkx "^0.5.0" -sequelize@^6.35.0: - version "6.37.1" - resolved "https://registry.npmjs.org/sequelize/-/sequelize-6.37.1.tgz#9380fe0a3b5ff17638d3fce30c3cf3a2396c2343" - integrity sha512-vIKKzQ9dGp2aBOxQRD1FmUYViuQiKXSJ8yah8TsaBx4U3BokJt+Y2A0qz2C4pj08uX59qpWxRqSLEfRmVOEgQw== - dependencies: - "@types/debug" "^4.1.8" - "@types/validator" "^13.7.17" - debug "^4.3.4" - dottie "^2.0.6" - inflection "^1.13.4" - lodash "^4.17.21" - moment "^2.29.4" - moment-timezone "^0.5.43" - pg-connection-string "^2.6.1" - retry-as-promised "^7.0.4" - semver "^7.5.4" - sequelize-pool "^7.1.0" - toposort-class "^1.0.1" - uuid "^8.3.2" - validator "^13.9.0" - wkx "^0.5.0" - serve-handler@6.1.3: version "6.1.3" resolved "https://registry.npmmirror.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" From ca0f1b5c05ba63023a67f8649217c3b44d43a764 Mon Sep 17 00:00:00 2001 From: ChengLei Shao Date: Sat, 9 Mar 2024 17:45:19 +0800 Subject: [PATCH 17/19] chore: test (#3664) --- .../server/__tests__/fields/destroy.test.ts | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts new file mode 100644 index 000000000..c9aa7b4dd --- /dev/null +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/destroy.test.ts @@ -0,0 +1,142 @@ +import Database, { Collection as DBCollection } from '@nocobase/database'; +import Application from '@nocobase/server'; +import { createApp } from '..'; + +describe('destroy', () => { + let db: Database; + let app: Application; + let Collection: DBCollection; + let Field: DBCollection; + + beforeEach(async () => { + app = await createApp({ + database: { + tablePrefix: '', + }, + }); + db = app.db; + Collection = db.getCollection('collections'); + Field = db.getCollection('fields'); + + await Collection.repository.create({ + values: { + name: 'a', + fields: [ + { + name: 'name', + type: 'string', + }, + ], + }, + context: {}, + }); + + await Collection.repository.create({ + values: { + name: 'b', + fields: [ + { + name: 'name', + type: 'string', + }, + ], + }, + context: {}, + }); + }); + + afterEach(async () => { + await app.destroy(); + }); + + describe('destroy field', () => { + it('should remove field in model when field destroyed', async () => { + const collection = await Collection.repository.create({ + values: { + name: 'test', + fields: [ + { name: 'f1', type: 'string' }, + { + name: 'name', + type: 'string', + }, + ], + }, + context: {}, + }); + + expect(db.getCollection('test').model.rawAttributes.name).toBeDefined(); + + await Field.repository.destroy({ + filter: { + name: 'name', + collectionName: 'test', + }, + context: {}, + }); + + expect(db.getCollection('test').model.rawAttributes.name).toBeUndefined(); + expect(db.getCollection('test').model.rawAttributes.f1).toBeDefined(); + }); + }); + + describe('destroy foreign key', () => { + it('should destroy association field when foreign key field destroyed', async () => { + await Field.repository.create({ + values: { + name: 'b', + type: 'hasOne', + target: 'b', + collectionName: 'a', + foreignKey: 'a_id', + interface: 'oho', + }, + context: {}, + }); + + // should create association field + expect( + await Field.repository.findOne({ + filter: { + collectionName: 'a', + name: 'b', + }, + }), + ).toBeTruthy(); + + const foreignKeyField = await Field.repository.findOne({ + filter: { + name: 'a_id', + collectionName: 'b', + }, + }); + + // should create foreign key + expect(foreignKeyField).toBeTruthy(); + + expect(db.getCollection('b').model.rawAttributes.a_id).toBeTruthy(); + + // destroy foreign key field + await Field.repository.destroy({ + filter: { + name: 'a_id', + collectionName: 'b', + }, + context: {}, + }); + + // should remove association field + expect( + await Field.repository.findOne({ + filter: { + collectionName: 'a', + name: 'b', + }, + }), + ).toBeFalsy(); + + // should remove foreign key + expect(db.getCollection('b').model.rawAttributes.a_id).toBeFalsy(); + }); + }); +}); From 9e88972ba63078cd837e684dd231371c7d3e2b5b Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Sat, 9 Mar 2024 18:59:56 +0800 Subject: [PATCH 18/19] fix(Form): retain field's default value after submitting the form (#3665) * fix(Form): should not be clear default value after submit * test: make e2e more stable --- .../client/src/block-provider/hooks/index.ts | 26 ++- .../form-create/schemaInitializer.test.ts | 35 ++- .../form-create/schemaSettings.test.ts | 6 +- .../__e2e__/form-create/templatesOfBug.ts | 210 ++++++++++++++++++ .../antd/association-field/SubTable.tsx | 1 - .../antd/association-field/util.ts | 6 +- 6 files changed, 274 insertions(+), 10 deletions(-) diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index 7f2aefc6c..abcdcc27c 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -29,6 +29,9 @@ import { transformVariableValue } from '../../variables/utils/transformVariableV import { useBlockRequestContext, useFilterByTk, useParamsFromRecord } from '../BlockProvider'; import { useDetailsBlockContext } from '../DetailsBlockProvider'; import { TableFieldResource } from '../TableFieldProvider'; +import { Field, Form } from '@formily/core'; +import { untracked } from '@formily/reactive'; +import { isSubMode } from '../../schema-component/antd/association-field/util'; export * from './useFormActiveFields'; export * from './useParsedFilter'; @@ -222,14 +225,14 @@ export const useCreateActionProps = () => { __parent?.service?.refresh?.(); if (!onSuccess?.successMessage) { message.success(t('Saved successfully')); - await form.reset(undefined, { forceClear: true }); + await resetFormCorrectly(form); return; } if (onSuccess?.manualClose) { modal.success({ title: compile(onSuccess?.successMessage), onOk: async () => { - await form.reset(undefined, { forceClear: true }); + await resetFormCorrectly(form); if (onSuccess?.redirecting && onSuccess?.redirectTo) { if (isURL(onSuccess.redirectTo)) { window.location.href = onSuccess.redirectTo; @@ -241,7 +244,7 @@ export const useCreateActionProps = () => { }); } else { message.success(compile(onSuccess?.successMessage)); - await form.reset(undefined, { forceClear: true }); + await resetFormCorrectly(form); if (onSuccess?.redirecting && onSuccess?.redirectTo) { if (isURL(onSuccess.redirectTo)) { window.location.href = onSuccess.redirectTo; @@ -1343,3 +1346,20 @@ function getTargetField(obj) { const result = keys.slice(0, index); return result; } + +/** + * 之所以不直接使用 form.reset() 是因为其无法将子表格重置为空 + * 主要用于修复这个问题:https://nocobase.height.app/T-3106 + * @param form + */ +async function resetFormCorrectly(form: Form) { + untracked(() => { + Object.keys(form.fields).forEach((key) => { + if (isSubMode(form.fields[key])) { + // 清空子表格或者子表单的初始值,可以确保后面的 reset 会清空子表格或者子表单的值 + (form.fields[key] as Field).initialValue = null; + } + }); + }); + await form.reset(); +} diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts index 4dfeb1b04..fb9b93f30 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts @@ -1,5 +1,6 @@ import { createBlockInPage, expect, oneEmptyForm, test } from '@nocobase/test/e2e'; -import { T3106 } from './templatesOfBug'; +import { T3106, T3469 } from './templatesOfBug'; +import { uid } from '@formily/shared'; test.describe('where creation form block can be added', () => { test('page', async ({ page, mockPage }) => { @@ -101,6 +102,38 @@ test.describe('configure actions', () => { ).toHaveValue('test name'); }); + // https://nocobase.height.app/T-3469 + test('default values for fields should not be cleared after submission', async ({ page, mockPage }) => { + await mockPage(T3469).goto(); + + // username 的值不能重复,所以为了避免报错这里随机生成一个值 + const username = uid(); + + // Username 字段没有设置默认值,手动输入一个值 + await page + .getByLabel('block-item-CollectionField-users-form-users.username-Username') + .getByRole('textbox') + .fill(username); + + // Nickname 字段设置了默认值,应该显示出默认值 + await expect( + page.getByLabel('block-item-CollectionField-users-form-users.nickname-Nickname').getByRole('textbox'), + ).toHaveValue('Should be cleared after submission'); + await expect( + page.getByLabel('block-item-CollectionField-users-form-users.username-Username').getByRole('textbox'), + ).toHaveValue(username); + + // 点击提交按钮之后,Nickname 字段的默认值应该依然显示,Username 字段的值应该被清空 + await page.getByLabel('action-Action-Submit-submit-').click(); + + await expect( + page.getByLabel('block-item-CollectionField-users-form-users.nickname-Nickname').getByRole('textbox'), + ).toHaveValue('Should be cleared after submission'); + await expect( + page.getByLabel('block-item-CollectionField-users-form-users.username-Username').getByRole('textbox'), + ).toHaveValue(''); + }); + test('customize: save record', async ({ page, mockPage }) => { await mockPage(oneEmptyForm).goto(); diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts index 746d5cd65..7f8a5acd7 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts @@ -1165,7 +1165,7 @@ test.describe('creation form block schema settings', () => { await page.getByRole('menuitem', { name: 'form Form' }).first().hover(); await page.getByRole('menuitem', { name: 'Users' }).hover(); await page.getByRole('menuitem', { name: 'Duplicate template' }).hover(); - await page.getByRole('menuitem', { name: 'Users_Form (Fields only)' }).click(); + await page.getByRole('menuitem', { name: 'Users_Form (Fields only)' }).first().click(); await page.mouse.move(300, 0); await expect(page.getByLabel('block-item-CardItem-users-form')).toBeVisible(); @@ -1174,7 +1174,7 @@ test.describe('creation form block schema settings', () => { await page.getByLabel('schema-initializer-Grid-CreateFormBlockInitializers-users').hover(); await page.getByRole('menuitem', { name: 'form Form' }).first().hover(); await page.getByRole('menuitem', { name: 'Reference template' }).hover(); - await page.getByRole('menuitem', { name: 'Users_Form (Fields only)' }).click(); + await page.getByRole('menuitem', { name: 'Users_Form (Fields only)' }).first().click(); await page.mouse.move(300, 0); await page.getByLabel('schema-initializer-Grid-CreateFormBlockInitializers-users').hover(); await expect(page.locator('.ant-drawer').getByLabel('block-item-CardItem-users-form')).toBeVisible(); @@ -1185,7 +1185,7 @@ test.describe('creation form block schema settings', () => { await page.getByLabel('schema-initializer-Grid-RecordBlockInitializers-users').click(); await page.getByRole('menuitem', { name: 'form Form' }).first().hover(); await page.getByRole('menuitem', { name: 'Reference template' }).hover(); - await page.getByRole('menuitem', { name: 'Users_Form (Fields only)' }).click(); + await page.getByRole('menuitem', { name: 'Users_Form (Fields only)' }).first().click(); await page.mouse.move(300, 0); //修改引用模板 diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts index 9f77d8448..c19e35cf7 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts @@ -5491,3 +5491,213 @@ export const T3251: PageConfig = { 'x-index': 1, }, }; + +export const T3469: PageConfig = { + pageSchema: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Page', + 'x-index': 1, + properties: { + '9u463vapg0k': { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid', + 'x-initializer': 'BlockInitializers', + 'x-index': 1, + properties: { + isaxpp1w32b: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + 'x-index': 1, + properties: { + '5dld0j6dehi': { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + 'x-index': 1, + properties: { + '96xwhprgfdg': { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-acl-action-props': { + skipScopeCheck: true, + }, + 'x-acl-action': 'users:create', + 'x-decorator': 'FormBlockProvider', + 'x-decorator-props': { + dataSource: 'main', + resource: 'users', + collection: 'users', + }, + 'x-toolbar': 'BlockSchemaToolbar', + 'x-settings': 'blockSettings:createForm', + 'x-component': 'CardItem', + 'x-component-props': {}, + 'x-index': 1, + properties: { + '0sj1sfgjoxa': { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'FormV2', + 'x-component-props': { + useProps: '{{ useFormBlockProps }}', + }, + 'x-index': 1, + properties: { + grid: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid', + 'x-initializer': 'FormItemInitializers', + 'x-index': 1, + properties: { + e4ke3wqxm2o: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + 'x-index': 1, + properties: { + l8uf6qeppmb: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + 'x-index': 1, + properties: { + nickname: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'string', + 'x-toolbar': 'FormItemSchemaToolbar', + 'x-settings': 'fieldSettings:FormItem', + 'x-component': 'CollectionField', + 'x-decorator': 'FormItem', + 'x-collection-field': 'users.nickname', + 'x-component-props': {}, + default: 'Should be cleared after submission', + 'x-index': 1, + 'x-uid': 'lpgebrm0gig', + 'x-async': false, + }, + }, + 'x-uid': 'novdv1tcz37', + 'x-async': false, + }, + }, + 'x-uid': 'kzf3dxvr0mb', + 'x-async': false, + }, + s17cswscq2o: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Row', + properties: { + oh79jnxzotw: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-component': 'Grid.Col', + properties: { + username: { + _isJSONSchemaObject: true, + version: '2.0', + type: 'string', + 'x-toolbar': 'FormItemSchemaToolbar', + 'x-settings': 'fieldSettings:FormItem', + 'x-component': 'CollectionField', + 'x-decorator': 'FormItem', + 'x-collection-field': 'users.username', + 'x-component-props': {}, + 'x-uid': 'z9dn5rnc3oi', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': '62vb90prmzk', + 'x-async': false, + 'x-index': 1, + }, + }, + 'x-uid': 'ti5u46epv08', + 'x-async': false, + 'x-index': 2, + }, + }, + 'x-uid': 'e365kp0cwm9', + 'x-async': false, + }, + '7660qws6e4c': { + _isJSONSchemaObject: true, + version: '2.0', + type: 'void', + 'x-initializer': 'FormActionInitializers', + 'x-component': 'ActionBar', + 'x-component-props': { + layout: 'one-column', + style: { + marginTop: 24, + }, + }, + 'x-index': 2, + properties: { + '79tmpu1usft': { + _isJSONSchemaObject: true, + version: '2.0', + title: '{{ t("Submit") }}', + 'x-action': 'submit', + 'x-component': 'Action', + 'x-toolbar': 'ActionSchemaToolbar', + 'x-settings': 'actionSettings:createSubmit', + 'x-component-props': { + type: 'primary', + htmlType: 'submit', + useProps: '{{ useCreateActionProps }}', + }, + 'x-action-settings': { + triggerWorkflows: [], + }, + type: 'void', + 'x-index': 1, + 'x-uid': '96sageysorb', + 'x-async': false, + }, + }, + 'x-uid': 'nnn377hn4o4', + 'x-async': false, + }, + }, + 'x-uid': 'j5qpwo8d6su', + 'x-async': false, + }, + }, + 'x-uid': 'rlcmlnna7k8', + 'x-async': false, + }, + }, + 'x-uid': 'b6n82zkmrsh', + 'x-async': false, + }, + }, + 'x-uid': 'agdpemeoz1v', + 'x-async': false, + }, + }, + 'x-uid': 'dn5nok8na2g', + 'x-async': false, + }, + }, + 'x-uid': 'lb8hlm9oyv8', + 'x-async': true, + }, +}; diff --git a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx index 4e31ebc64..ff815c84b 100644 --- a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx @@ -175,7 +175,6 @@ export const SubTable: any = observer( onClick={() => { field.value = field.value || []; field.value.push(markRecordAsNew({})); - field.onInput(field.value); }} > {t('Add new')} diff --git a/packages/core/client/src/schema-component/antd/association-field/util.ts b/packages/core/client/src/schema-component/antd/association-field/util.ts index 9ed66183f..a5dc2ec1a 100644 --- a/packages/core/client/src/schema-component/antd/association-field/util.ts +++ b/packages/core/client/src/schema-component/antd/association-field/util.ts @@ -5,6 +5,7 @@ import { Tag } from 'antd'; import dayjs from 'dayjs'; import React from 'react'; import { CollectionFieldOptions_deprecated, useCollectionManager_deprecated } from '../../../collection-manager'; +import { Field } from '@formily/core'; export const useLabelUiSchemaV2 = () => { const { getCollectionJoinField } = useCollectionManager_deprecated(); @@ -102,6 +103,7 @@ export function isShowFilePicker(labelUiSchema) { /** * 当前字段的模式是否是 `子表格` 或者 `子表单` */ -export function isSubMode(fieldSchema: Schema) { - return ['Nester', 'SubTable', 'PopoverNester'].includes(fieldSchema['x-component-props']?.mode); +export function isSubMode(field: any) { + const mode = field['x-component-props']?.mode || (field as Field).componentProps?.mode; + return ['Nester', 'SubTable', 'PopoverNester'].includes(mode); } From 2d991ba7cfebe2ba75885e90403d7cc2bff352c8 Mon Sep 17 00:00:00 2001 From: sealday Date: Thu, 7 Mar 2024 20:45:00 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=AF=B9main=E7=9A=84?= =?UTF-8?q?=E6=89=80=E6=9C=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Frontend - Backend Co-authored-by: sealday Co-authored-by: wjh Co-authored-by: 吕延祥 <2256334253@qq.com> Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/nocobase/pulls/317 --- .eslintrc | 9 + .gitignore | 1 + .prettierrc | 11 - .prettierrc.js | 24 + Dockerfile | 10 +- build.sh | 1 + docker/hera/Dockerfile | 19 + docker/nocobase/docker-entrypoint.sh | 6 +- package.json | 10 +- .../public/favicon/android-chrome-192x192.png | Bin 7357 -> 6501 bytes .../public/favicon/android-chrome-512x512.png | Bin 19546 -> 19290 bytes .../public/favicon/apple-touch-icon.png | Bin 6600 -> 6528 bytes .../client/public/favicon/favicon-16x16.png | Bin 376 -> 573 bytes .../client/public/favicon/favicon-32x32.png | Bin 792 -> 1074 bytes .../app/client/public/favicon/favicon.ico | Bin 15406 -> 16958 bytes packages/core/build/src/buildPlugin.ts | 2 +- packages/core/cli/src/commands/start.js | 4 + packages/core/client/package.json | 2 +- .../core/client/src/application/Plugin.ts | 2 + .../client/src/application/PluginManager.ts | 4 + .../client/src/block-provider/hooks/index.ts | 7 + .../collection-manager/interfaces/checkbox.ts | 7 + .../data-block/DataBlockResourceProvider.tsx | 4 +- packages/core/client/src/data-source/utils.ts | 2 +- packages/core/client/src/index.ts | 7 + .../form/createFormActionInitializers.tsx | 3 + .../form/updateFormActionInitializers.tsx | 3 + .../Select/selectComponentFieldSettings.tsx | 12 + packages/core/client/src/powered-by/index.tsx | 4 +- .../antd/action/Action.Designer.tsx | 2 +- .../association-field/InternalCascader.tsx | 316 + .../antd/association-field/InternalViewer.tsx | 7 +- .../antd/association-field/SubTable.tsx | 2 +- .../antd/custom-cascader/CustomCascader.tsx | 61 + .../antd/custom-cascader/ReadPretty.tsx | 35 + .../antd/custom-cascader/defaultFieldNames.ts | 5 + .../antd/custom-cascader/index.md | 36 + .../antd/custom-cascader/index.ts | 1 + .../antd/form-item/FormItem.Settings.tsx | 12 +- .../src/schema-component/antd/grid/Grid.tsx | 1 + .../client/src/schema-component/antd/index.ts | 1 + .../src/schema-component/antd/space/index.tsx | 2 +- .../antd/table-v2/Table.Column.Designer.tsx | 15 +- .../schema-component/antd/table-v2/Table.tsx | 12 +- .../core/RemoteSchemaComponent.tsx | 7 +- .../hooks/useFieldModeOptions.tsx | 2 + .../items/TableActionColumnInitializer.tsx | 4 + .../client/src/schema-initializer/utils.ts | 19 +- .../hooks/useParentRecordVariable.ts | 1 + packages/core/client/src/unsafe.tsx | 58 + .../src/variables/VariablesProvider.tsx | 13 +- .../core/create-nocobase-app/package.json | 2 +- .../features/referential-integrity-check.ts | 7 +- .../core/database/src/sql-parser/postgres.js | 23533 ++++++++++------ packages/core/devtools/package.json | 3 +- packages/core/sdk/package.json | 2 +- packages/core/server/package.json | 3 +- packages/core/server/src/application.ts | 45 +- packages/core/server/src/gateway/ws-server.ts | 35 +- .../core/server/src/plugin-manager/deps.ts | 2 +- packages/core/utils/src/dayjs.ts | 2 + packages/core/utils/src/decorators.ts | 61 + packages/core/utils/src/index.ts | 2 + .../src/typedi/container-instance.class.ts | 488 + .../src/typedi/container-registry.class.ts | 92 + .../decorators/inject-many.decorator.ts | 42 + .../src/typedi/decorators/inject.decorator.ts | 42 + .../typedi/decorators/service.decorator.ts | 28 + packages/core/utils/src/typedi/empty.const.ts | 6 + .../typedi/error/cannot-inject-value.error.ts | 22 + .../error/cannot-instantiate-value.error.ts | 34 + .../typedi/error/service-not-found.error.ts | 33 + packages/core/utils/src/typedi/index.ts | 22 + .../interfaces/container-options.interface.ts | 48 + .../typedi/interfaces/handler.interface.ts | 31 + .../interfaces/service-metadata.interface.ts | 61 + .../interfaces/service-options.interface.ts | 10 + packages/core/utils/src/typedi/token.class.ts | 11 + .../types/abstract-constructable.type.ts | 7 + .../src/typedi/types/constructable.type.ts | 10 + .../typedi/types/container-identifier.type.ts | 4 + .../src/typedi/types/container-scope.type.ts | 1 + .../typedi/types/service-identifier.type.ts | 14 + .../utils/resolve-to-type-wrapper.util.ts | 43 + .../{transformers.ts => transformers.tsx} | 46 +- .../src/client/chart/antd/GroupedTable.ts | 115 + .../src/client/chart/antd/index.ts | 3 +- .../src/client/chart/chart.ts | 13 +- .../src/client/chart/g2plot/dualAxes.ts | 7 +- .../src/client/configure/ChartConfigure.tsx | 3 +- .../src/client/configure/schemas/configure.ts | 11 + .../src/client/hooks/filter.ts | 4 +- .../src/client/hooks/transformer.ts | 33 +- .../src/client/index.tsx | 1 + .../src/client/renderer/ChartRenderer.tsx | 1 + .../client/renderer/ChartRendererProvider.tsx | 1 + .../src/locale/en-US.json | 6 +- .../src/locale/zh-CN.json | 6 +- .../src/server/actions/query.ts | 4 + .../src/client/interfaces/formula.tsx | 8 +- .../src/server/actions/importXlsx.ts | 4 +- .../@nocobase/plugin-workflow/package.json | 2 +- .../src/client/nodes/calculation.tsx | 17 + .../instructions/CalculationInstruction.ts | 14 +- 104 files changed, 16999 insertions(+), 8812 deletions(-) delete mode 100644 .prettierrc create mode 100644 .prettierrc.js create mode 100644 build.sh create mode 100644 docker/hera/Dockerfile create mode 100644 packages/core/client/src/schema-component/antd/association-field/InternalCascader.tsx create mode 100644 packages/core/client/src/schema-component/antd/custom-cascader/CustomCascader.tsx create mode 100644 packages/core/client/src/schema-component/antd/custom-cascader/ReadPretty.tsx create mode 100644 packages/core/client/src/schema-component/antd/custom-cascader/defaultFieldNames.ts create mode 100644 packages/core/client/src/schema-component/antd/custom-cascader/index.md create mode 100644 packages/core/client/src/schema-component/antd/custom-cascader/index.ts create mode 100644 packages/core/client/src/unsafe.tsx create mode 100644 packages/core/utils/src/decorators.ts create mode 100644 packages/core/utils/src/typedi/container-instance.class.ts create mode 100644 packages/core/utils/src/typedi/container-registry.class.ts create mode 100644 packages/core/utils/src/typedi/decorators/inject-many.decorator.ts create mode 100644 packages/core/utils/src/typedi/decorators/inject.decorator.ts create mode 100644 packages/core/utils/src/typedi/decorators/service.decorator.ts create mode 100644 packages/core/utils/src/typedi/empty.const.ts create mode 100644 packages/core/utils/src/typedi/error/cannot-inject-value.error.ts create mode 100644 packages/core/utils/src/typedi/error/cannot-instantiate-value.error.ts create mode 100644 packages/core/utils/src/typedi/error/service-not-found.error.ts create mode 100644 packages/core/utils/src/typedi/index.ts create mode 100644 packages/core/utils/src/typedi/interfaces/container-options.interface.ts create mode 100644 packages/core/utils/src/typedi/interfaces/handler.interface.ts create mode 100644 packages/core/utils/src/typedi/interfaces/service-metadata.interface.ts create mode 100644 packages/core/utils/src/typedi/interfaces/service-options.interface.ts create mode 100644 packages/core/utils/src/typedi/token.class.ts create mode 100644 packages/core/utils/src/typedi/types/abstract-constructable.type.ts create mode 100644 packages/core/utils/src/typedi/types/constructable.type.ts create mode 100644 packages/core/utils/src/typedi/types/container-identifier.type.ts create mode 100644 packages/core/utils/src/typedi/types/container-scope.type.ts create mode 100644 packages/core/utils/src/typedi/types/service-identifier.type.ts create mode 100644 packages/core/utils/src/typedi/utils/resolve-to-type-wrapper.util.ts rename packages/plugins/@nocobase/plugin-data-visualization/src/client/block/{transformers.ts => transformers.tsx} (60%) create mode 100644 packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/GroupedTable.ts diff --git a/.eslintrc b/.eslintrc index 0db89b0ba..8086d9d41 100755 --- a/.eslintrc +++ b/.eslintrc @@ -66,6 +66,15 @@ "rules": { "@typescript-eslint/no-floating-promises": "error" } + }, + { + "files": [ + "packages/plugins/@hera/**/*.{ts,js,tsx,jsx}", + "packages/plugins/@hera/**/*.{ts,js,tsx,jsx}" + ], + "rules": { + "eqeqeq": ["error", "smart"] + } } ] } diff --git a/.gitignore b/.gitignore index d1badae95..474824647 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ storage/tmp storage/app.watch.ts storage/logs-e2e storage/uploads-e2e +storage/fonts storage/.pm2-* tsconfig.paths.json /playwright diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 764fbde2e..000000000 --- a/.prettierrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "singleQuote": true, - "trailingComma": "all", - "printWidth": 120, - "overrides": [ - { - "files": ".prettierrc", - "options": { "parser": "json" } - } - ] -} diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 000000000..fe9b9b1d2 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,24 @@ +module.exports = { + plugins: ['prettier-plugin-sql'], + singleQuote: true, + trailingComma: 'all', + printWidth: 120, + overrides: [ + { + files: '.prettierrc', + options: { parser: 'json' }, + }, + { + files: '*.sql', + options: { + language: 'postgresql', + parser: 'sql', + keywordCase: 'upper', + paramTypes: JSON.stringify({ + custom: [{ regex: String.raw`\$\{[a-zA-Z0-9_]+\}|:[a-zA-Z0-9_]+` }], + }), + formatter: 'sql-formatter', + }, + }, + ], +}; diff --git a/Dockerfile b/Dockerfile index b9a40648b..8fa05cfa6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-bullseye as builder +FROM node:20-bullseye as builder ARG VERDACCIO_URL=http://host.docker.internal:10104/ ARG COMMIT_HASH ARG APPEND_PRESET_LOCAL_PLUGINS @@ -10,18 +10,18 @@ ENV PLUGINS_DIRS=${PLUGINS_DIRS} RUN apt-get update && apt-get install -y jq WORKDIR /tmp COPY . /tmp -RUN npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL +RUN npm_config_registry=$VERDACCIO_URL npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL RUN cd /tmp && \ NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +'%Y%m%d%H%M%S')" \ && tmp=$(mktemp) \ && jq ".version = \"${NEWVERSION}\"" lerna.json > "$tmp" && mv "$tmp" lerna.json -RUN yarn install && yarn build --no-dts +RUN yarn install --network-timeout 600000 && yarn build --no-dts RUN git checkout -b release-$(date +'%Y%m%d%H%M%S') \ && yarn version:alpha -y RUN git config user.email "test@mail.com" \ && git config user.name "test" && git add . \ - && git commit -m "chore(versions): test publish packages" + && git commit --no-verify -m "chore(versions): test publish packages" RUN yarn release:force --registry $VERDACCIO_URL RUN yarn config set registry $VERDACCIO_URL @@ -41,7 +41,7 @@ RUN cd /app \ && tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app . -FROM node:18-bullseye-slim +FROM node:20-bullseye-slim RUN apt-get update && apt-get install -y nginx RUN rm -rf /etc/nginx/sites-enabled/default COPY ./docker/nocobase/nocobase.conf /etc/nginx/sites-enabled/nocobase.conf diff --git a/build.sh b/build.sh new file mode 100644 index 000000000..1cdb12528 --- /dev/null +++ b/build.sh @@ -0,0 +1 @@ +DOCKER_BUILDKIT=1 docker build -f docker/hera/Dockerfile -t hera:0.3 . diff --git a/docker/hera/Dockerfile b/docker/hera/Dockerfile new file mode 100644 index 000000000..156fdc3c8 --- /dev/null +++ b/docker/hera/Dockerfile @@ -0,0 +1,19 @@ +# 设置基础镜像 +FROM node:20.9.0 as builder + +# 在容器中创建/app/nocobase目录 +WORKDIR /app/nocobase + +# 设置npm和pnpm的registry为https://registry.npmmirror.com +RUN npm config set registry https://registry.npmmirror.com && \ + yarn config set registry https://registry.npmmirror.com + +# 将当前目录中的所有文件复制到容器的/app/nocobase目录下 +COPY . /app/nocobase + +# 使用 pnpm 安装依赖 +RUN yarn +RUN yarn build + +# 使用 pm2-runtime 执行packages/core/app/lib/index.js文件 +CMD ["yarn", "pm2-runtime", "packages/core/app/lib/index.js", "--", "start"] diff --git a/docker/nocobase/docker-entrypoint.sh b/docker/nocobase/docker-entrypoint.sh index adb13286f..4480dbcbc 100755 --- a/docker/nocobase/docker-entrypoint.sh +++ b/docker/nocobase/docker-entrypoint.sh @@ -14,7 +14,11 @@ if [ ! -f "/app/nocobase/package.json" ]; then touch /app/nocobase/node_modules/@nocobase/app/dist/client/index.html fi -cd /app/nocobase && yarn start --quickstart +if [ -z "$PM2_INSTANCE_NUM" ]; then + PM2_INSTANCE_NUM=1 +fi + +cd /app/nocobase && yarn start --quickstart -i $PM2_INSTANCE_NUM # Run command with node if the first argument contains a "-" or is not a system command. The last # part inside the "{}" is a workaround for the following bug in ash/dash: diff --git a/package.json b/package.json index e9017dcb8..b746b3aeb 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,10 @@ "@typescript-eslint/parser": "^6.2.0", "react-router-dom": "^6.11.2", "react-router": "^6.11.2", + "prettier": "^3.1.1", "react": "^18.0.0", "react-dom": "^18.0.0", + "tsx": "^4.6.2", "nwsapi": "2.2.7", "antd": "5.12.8" }, @@ -58,7 +60,7 @@ } }, "lint-staged": { - "*.{js,json}": [ + "*.{js,json,sql}": [ "prettier --write" ], "*.ts?(x)": [ @@ -72,10 +74,14 @@ "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "auto-changelog": "^2.4.0", + "axios": "^1.6.2", + "commander": "^9.2.0", "eslint-plugin-jest-dom": "^5.0.1", "eslint-plugin-testing-library": "^5.11.0", "ghooks": "^2.0.4", "lint-staged": "^13.2.3", + "prettier": "^3.1.1", + "prettier-plugin-sql": "^0.17.0", "pretty-format": "^24.0.0", "pretty-quick": "^3.1.0", "react": "^18.0.0", @@ -83,7 +89,7 @@ "typescript": "5.1.3" }, "volta": { - "node": "18.14.2", + "node": "20.9.0", "yarn": "1.22.19" }, "dependencies": {} diff --git a/packages/core/app/client/public/favicon/android-chrome-192x192.png b/packages/core/app/client/public/favicon/android-chrome-192x192.png index 6be0bbfe892b26454369a9a5682b166dd44478d7..8061d9707edf45c2c825aeaef71aa2166ef41537 100644 GIT binary patch literal 6501 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 QAIFjaE~6s-P0}#%e?H-|=>Px# diff --git a/packages/core/app/client/public/favicon/android-chrome-512x512.png b/packages/core/app/client/public/favicon/android-chrome-512x512.png index 1a6e2902ec26ba639a3a58f1cc04a34cbfdb2416..74261a793bc5694f996fb766421a806884b78d1b 100644 GIT binary patch literal 19290 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 Z_FrE1hCKt`edhoG002ovPDHLkV1h)on27)Y literal 19546 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 M07*qoM6N<$f>A2rg#Z8m diff --git a/packages/core/app/client/public/favicon/apple-touch-icon.png b/packages/core/app/client/public/favicon/apple-touch-icon.png index f80966cc72f29b2100440fd0fcc3a329b76307dd..79c5a3f649bd71540496a2c6abeffe51131c2477 100644 GIT binary patch literal 6528 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 M4Wy-1sbCTQKjnzWga7~l literal 6600 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 diff --git a/packages/core/app/client/public/favicon/favicon-32x32.png b/packages/core/app/client/public/favicon/favicon-32x32.png index 1e0220fd2453c00f011b77834d0822875322e072..cdb024d3fc90b3d05f9e9f7798534db44ccf1d40 100644 GIT binary patch delta 1054 zcmV+(1mXLb2C@i{BYyx1a7bBm0002&0002&0eL8Ky#N3J8FWQhbW?9;ba!ELWdL_~ zcP?peYja~^aAhuUa%Y?FJQ@H11HVZ`K~z|U?UzkxTvZguf9K9LA2XA9(wo(+K;E=t*D}K~Q!A`wAn<=e{gYW&L~z+y{K= zMnk=&a{DWZ-;zk}Q@?xwbOH!mP;}6ZwoDYqMaEM13X)K`9bv!qa~@4`q6}MdM-wZ^?(g%#OlL9*c5I)tl%$~WSz|3aF^Oze7%rrEv?h@=HE6eFa0JpyT zYfI$qrGK5paiXf;ey3hXTq6M z;F75Jy0PG~T8ewQ)q6PTjHO=ykgm}y5g)$qfhORGb@APQaj^MPErs)loLcH&UC#lx z0c&FH9me1v@Widb^w&!qz#Rx)R+WCh0*yB7dw<#p`mi@X@nbabUA@HfNXCM*2www; z=tBnYKtc7}dW+|wXnvw$KhO#wNP06Lhewuo8?ldCV?LQ144f};#y)1ne4OX51!LuR z6#!Z*o(08_v-lii$ARmO+Gixrb^xcnz#Wh{+jSVb*_>t1f|9s^LLqsvNGY!N26Py! zDt~>V#6kLW7+Z>~CTCS!0A3ZtY$dL421*rNwMAHrst_L2ABp=s}J7%X5}XG-y)|W4|uQB zMujuv>~w5vT8h`(z_zB;QJ@__g)_n{YJZ&e^c1is7ox}3S6g1rwb->o=Sc#Mnbgt0 z`c9cjE(Y%wRV94ls$-1r8-xxoei3wBFhAEqT(LKL%iiWu3t0bM?oiWw;cn<8u7t(< z&LYxN3(@kBDXi~Fcc^I|He606j&VBDj|2Up^eA+&g@45cWCSh)(+ck=qoI$AyBF<0 Y0bM|$14rl`HUIzs07*qoM6N<$f-CU(;{X5v delta 769 zcmV+c1OEK72$%+tBYy(lNklN&JN8aTt5>Uz`8& z5I7Id;4eIl6CGf8;;s^nqk~9{O5l1tQ3!m|2Vf?4<5RqjlfCSQC2%&L!nuV&zP@ek zEcR>0OJF{>;st!thKecJfU9u^mXAu{Ol-kr*o;3bz^}q{*oXJ=3RaIoU=9+(oZ*KR zz&X-YScvubt$*wpiNO6>jI}sc0e(4l;RC$WWj{25E3hBGmK6J{g+R#OT+aOG9=1af zSW(g^Up)^yN(8pypDyP~wS4twgHo;b4qQ^4+)_Y(!0hsW2_DAd__{n>ie=b{?^`0& z8iBjLifI)5^^bSZ;ab_Qe{xZHvIWh;(+ZZhr#J`|UV@&nqrwOs1Agc?bUO z-jlTHDUs+$;1PU;Zz~8a!doR`hj1Uh>D)I_1R~i{&1gXsu~~oPF}&1#_(Tx64sYYy z0TD`pdLU6godhD;sgU`dRdGDW(?<*<5Fa_eDB&L+4tw2!xkdLEQ~;l1(ncW0KjJ}r zTy}O6NPm^fIp@6385TVDH3VXpOxatiVw5sjkajB(x?vRHW=}1F#y+X{C4Rw5oIf7$ zVInYIoWA=Lfiw;GP8dRq~*R8&c9Gzgar#1|!{aCZyjx zm9U0DV{=U@wQ0vP5w{H~iEw(!Oi1~?*A4bR(OR5iqi>5K00000NkvXXu0mjf9{+Cu diff --git a/packages/core/app/client/public/favicon/favicon.ico b/packages/core/app/client/public/favicon/favicon.ico index ade697999ac8fab1d242bfbf9c61cc4773da22d1..fd2001c822630b8f24888cc2f1b31c43937c47d4 100644 GIT binary patch literal 16958 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, curr) => { - if (curr.startsWith('@nocobase')) { + if (curr.startsWith('@nocobase') || curr.startsWith('@hera')) { prev[`${curr}/client`] = curr; } prev[curr] = curr; diff --git a/packages/core/cli/src/commands/start.js b/packages/core/cli/src/commands/start.js index db516c2d0..7375aa621 100644 --- a/packages/core/cli/src/commands/start.js +++ b/packages/core/cli/src/commands/start.js @@ -3,6 +3,7 @@ const { isDev, run, postCheck, runInstall, promptForTs } = require('../util'); const { existsSync, unlink } = require('fs'); const { resolve } = require('path'); const chalk = require('chalk'); +const _ = require('lodash'); /** * @@ -14,6 +15,7 @@ module.exports = (cli) => { .command('start') .option('-p, --port [port]') .option('-d, --daemon') + .option('-i, --instances [number]') .option('--db-sync') .option('--quickstart') .allowUnknownOption() @@ -48,6 +50,8 @@ module.exports = (cli) => { 'pm2-runtime', [ 'start', + '-i', + _.toNumber(opts.instances || 1), `${APP_PACKAGE_ROOT}/lib/index.js`, NODE_ARGS ? `--node-args="${NODE_ARGS}"` : undefined, '--', diff --git a/packages/core/client/package.json b/packages/core/client/package.json index 4de2f1042..ca958ac6a 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -32,7 +32,7 @@ "ahooks": "^3.7.2", "antd": "^5.12.8", "antd-style": "3.4.5", - "axios": "^0.26.1", + "axios": "^1.6.2", "classnames": "^2.3.1", "cronstrue": "^2.11.0", "file-saver": "^2.0.5", diff --git a/packages/core/client/src/application/Plugin.ts b/packages/core/client/src/application/Plugin.ts index 61c9836ce..45c18380d 100644 --- a/packages/core/client/src/application/Plugin.ts +++ b/packages/core/client/src/application/Plugin.ts @@ -44,6 +44,8 @@ export class Plugin { async load() {} + async afterLoad() {} + t(text: TFuncKey | TFuncKey[], options: TOptions = {}) { return this.app.i18n.t(text, { ns: this.options?.['packageName'], ...(options as any) }); } diff --git a/packages/core/client/src/application/PluginManager.ts b/packages/core/client/src/application/PluginManager.ts index 001f09e3c..8bd215cf8 100644 --- a/packages/core/client/src/application/PluginManager.ts +++ b/packages/core/client/src/application/PluginManager.ts @@ -89,5 +89,9 @@ export class PluginManager { for (const plugin of this.pluginInstances.values()) { await plugin.load(); } + + for (const plugin of this.pluginInstances.values()) { + await plugin.afterLoad(); + } } } diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index abcdcc27c..d5b00e988 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1276,6 +1276,13 @@ export const useAssociationNames = (dataSource?: string) => { collectAppends(condition); }); } + // 处理多对一标题字段 + if (s['x-component-props']?.['x-next-title']) { + const pre = prefix && prefix !== '' ? prefix + '.' + s.name : s.name; + const title = s['x-component-props']['x-next-title']; + const path = pre + '.' + title.label; + appends.add(path); + } const isTreeCollection = isAssociationField && getCollection(collectionField.target, dataSource)?.template === 'tree'; if (collectionField && (isAssociationField || isAssociationSubfield) && s['x-component'] !== 'TableField') { diff --git a/packages/core/client/src/collection-manager/interfaces/checkbox.ts b/packages/core/client/src/collection-manager/interfaces/checkbox.ts index 4b464fbca..8dcd722e4 100644 --- a/packages/core/client/src/collection-manager/interfaces/checkbox.ts +++ b/packages/core/client/src/collection-manager/interfaces/checkbox.ts @@ -19,6 +19,13 @@ export class CheckboxFieldInterface extends CollectionFieldInterface { hasDefaultValue = true; properties = { ...defaultProps, + 'uiSchema.x-component-props.showUnchecked': { + type: 'boolean', + title: '{{t("Display X when unchecked")}}', + default: false, + 'x-decorator': 'FormItem', + 'x-component': 'Checkbox', + }, }; filterable = { operators: operators.boolean, diff --git a/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx b/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx index 32e3e59a8..e7f89be6b 100644 --- a/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx +++ b/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx @@ -35,8 +35,8 @@ export const DataBlockResourceProvider: FC<{ children?: ReactNode }> = ({ childr if (association) { return api.resource(association, sourceIdValue, headers); } - return api.resource(collectionName, undefined, headers); - }, [api, association, collection, sourceIdValue, headers]); + return api.resource(dataBlockProps.resource ?? collectionName, undefined, headers); + }, [api, association, collection, sourceIdValue, headers, dataBlockProps.resource]); return {children}; }; diff --git a/packages/core/client/src/data-source/utils.ts b/packages/core/client/src/data-source/utils.ts index c0b2e401c..8a180e288 100644 --- a/packages/core/client/src/data-source/utils.ts +++ b/packages/core/client/src/data-source/utils.ts @@ -11,7 +11,7 @@ export const isTitleField = (dm: DataSourceManager, field: CollectionFieldOption return !field.isForeignKey && dm.collectionFieldInterfaceManager.getFieldInterface(field.interface)?.titleUsable; }; -export const useDataSourceHeaders = (dataSource?: string) => { +export const useDataSourceHeaders = (dataSource?: string): any => { const headers = useMemo(() => { if (dataSource && dataSource !== DEFAULT_DATA_SOURCE_KEY) { return { 'x-data-source': dataSource }; diff --git a/packages/core/client/src/index.ts b/packages/core/client/src/index.ts index 64bcbcdff..bd8ebb023 100644 --- a/packages/core/client/src/index.ts +++ b/packages/core/client/src/index.ts @@ -58,3 +58,10 @@ export * from './modules/blocks/BlockSchemaToolbar'; export * from './modules/blocks/data-blocks/table'; export * from './modules/blocks/data-blocks/form'; export * from './modules/blocks/data-blocks/table-selector'; +export * as __UNSAFE__ from './unsafe'; +export type { + DynamicComponentProps as __UNSAFE__DynamicComponentProps, + VariablesContextType as __UNSAFE__VariablesContextType, + VariableOption as __UNSAFE__VariableOption, + Option as __UNSAFE__VariableInputOption, +} from './unsafe'; diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/createFormActionInitializers.tsx b/packages/core/client/src/modules/blocks/data-blocks/form/createFormActionInitializers.tsx index 87b57abbe..1957a00a1 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/createFormActionInitializers.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/form/createFormActionInitializers.tsx @@ -4,6 +4,9 @@ export const createFormActionInitializers = new SchemaInitializer({ name: 'CreateFormActionInitializers', title: '{{t("Configure actions")}}', icon: 'SettingOutlined', + style: { + marginLeft: '8px', + }, items: [ { type: 'itemGroup', diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/updateFormActionInitializers.tsx b/packages/core/client/src/modules/blocks/data-blocks/form/updateFormActionInitializers.tsx index 56aaa47fc..aa953ea9e 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/updateFormActionInitializers.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/form/updateFormActionInitializers.tsx @@ -4,6 +4,9 @@ export const updateFormActionInitializers = new SchemaInitializer({ name: 'UpdateFormActionInitializers', title: '{{t("Configure actions")}}', icon: 'SettingOutlined', + style: { + marginLeft: '8px', + }, items: [ { type: 'itemGroup', diff --git a/packages/core/client/src/modules/fields/component/Select/selectComponentFieldSettings.tsx b/packages/core/client/src/modules/fields/component/Select/selectComponentFieldSettings.tsx index 4432d31a6..f107afef3 100644 --- a/packages/core/client/src/modules/fields/component/Select/selectComponentFieldSettings.tsx +++ b/packages/core/client/src/modules/fields/component/Select/selectComponentFieldSettings.tsx @@ -75,6 +75,8 @@ const titleField: any = { const fieldSchema = tableColumnSchema || schema; const targetCollectionField = useCollectionField(); const collectionField = tableColumnField || targetCollectionField; + // 处理多对一关系标题显示 + const { getCollectionFields } = useCollectionManager_deprecated(); const fieldNames = { ...collectionField?.uiSchema?.['x-component-props']?.['fieldNames'], ...field?.componentProps?.fieldNames, @@ -95,6 +97,16 @@ const titleField: any = { }; fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {}; fieldSchema['x-component-props']['fieldNames'] = newFieldNames; + // 处理多对一关系标题显示 + const target = getCollectionFields(collectionField.target).find((field) => field.name === label); + if (target.interface === 'm2o') { + fieldSchema['x-component-props']['x-next-title'] = { + label, + collection: target.collectionName, + }; + } else { + fieldSchema['x-component-props']['x-next-title'] = null; + } schema['x-component-props'] = fieldSchema['x-component-props']; field.componentProps.fieldNames = fieldSchema['x-component-props'].fieldNames; const path = field.path?.splice(field.path?.length - 1, 1); diff --git a/packages/core/client/src/powered-by/index.tsx b/packages/core/client/src/powered-by/index.tsx index dd5546884..1963d879a 100644 --- a/packages/core/client/src/powered-by/index.tsx +++ b/packages/core/client/src/powered-by/index.tsx @@ -10,6 +10,8 @@ export const PoweredBy = () => { 'en-US': 'https://www.nocobase.com', 'zh-CN': 'https://cn.nocobase.com', }; + const date = new Date(); + const year = date.getFullYear(); return (

{ } `} > - Powered by NocoBase + ©2023-{year} 上海道有云网络科技有限公司 版权所有 沪ICP备2023024678号
); }; diff --git a/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx b/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx index 19ac2679c..755dd180b 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx @@ -757,7 +757,7 @@ export const ActionDesigner = (props) => { removeButtonProps, buttonEditorProps, linkageRulesProps, - schemaSettings = 'ActionSettings', + schemaSettings, ...restProps } = props; const app = useApp(); diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalCascader.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalCascader.tsx new file mode 100644 index 000000000..1a3b56449 --- /dev/null +++ b/packages/core/client/src/schema-component/antd/association-field/InternalCascader.tsx @@ -0,0 +1,316 @@ +import { ArrayItems, FormItem } from '@formily/antd-v5'; +import { createForm, onFormValuesChange } from '@formily/core'; +import { FormProvider, connect, createSchemaField, observer, useField, useFieldSchema } from '@formily/react'; +import { uid } from '@formily/shared'; +import { Input, Space, Spin, Tag } from 'antd'; +import dayjs from 'dayjs'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { css, useAPIClient, useCollectionManager_deprecated } from '../../..'; +import { mergeFilter } from '../../../filter-provider/utils'; +import { CustomCascader, SchemaComponent, useCompile } from '../..'; +import useServiceOptions, { useAssociationFieldContext } from './hooks'; + +const EMPTY = 'N/A'; +const SchemaField = createSchemaField({ + components: { + Space, + Input, + ArrayItems, + FormItem, + }, +}); + +const Cascade = connect((props) => { + const { data, mapOptions, onChange } = props; + const [selectedOptions, setSelectedOptions] = useState([]); + const [options, setOptions] = useState(data); + const [loading, setLoading] = useState(false); + const compile = useCompile(); + const api = useAPIClient(); + const service = useServiceOptions(props); + const { options: collectionField, field: associationField } = useAssociationFieldContext(); + const resource = api.resource(collectionField.target); + const { getCollectionJoinField, getInterface } = useCollectionManager_deprecated(); + const fieldNames = associationField?.componentProps?.fieldNames; + const FieldSchema = useFieldSchema(); + const targetField = + collectionField?.target && + fieldNames?.label && + getCollectionJoinField(`${collectionField.target}.${fieldNames.label}`); + const operator = useMemo(() => { + if (targetField?.interface) { + return getInterface(targetField.interface)?.filterable?.operators[0].value || '$includes'; + } + return '$includes'; + }, [targetField]); + const field: any = useField(); + useEffect(() => { + if (props.value) { + const values = Array.isArray(props.value) + ? extractLastNonNullValueObjects(props.value?.filter((v) => v.value), true) + : transformNestedData(props.value); + const defaultData = values?.map?.((v) => { + return v.id; + }); + setSelectedOptions(defaultData); + } + onDropdownVisibleChange('true'); + }, []); + const handleGetOptions = async () => { + const response = await resource.list({ + pageSize: 9999, + params: service?.params, + filter: mergeFilter([service?.params?.filter, filter]), + tree: true, + }); + + return response?.data?.data; + }; + + const handleSelect = async (option) => { + if (option) { + if (['o2m', 'm2m'].includes(collectionField.interface)) { + const fieldValue = Array.isArray(associationField.fieldValue) ? associationField.fieldValue : []; + fieldValue[field.index] = option[option.length - 1]; + associationField.fieldValue = fieldValue; + } else { + associationField.value = option[option.length - 1]; + } + const options = []; + options.push({ + key: undefined, + children: [], + value: option[0], + }); + option.forEach((item, index) => { + if (index === option.length - 1) { + options.push({ + key: item.id, + children: null, + }); + } else { + options.push({ + key: item.id, + children: item.children, + value: option[index + 1], + }); + } + }); + onChange?.(options); + } + }; + const cascadeOption = (option) => { + option.forEach((item) => { + item['value'] = item[fieldNames.value]; + item['label'] = item[fieldNames.label]; + if (item.children) { + item.children = cascadeOption(item.children); + } + }); + return option; + }; + + const onDropdownVisibleChange = async (visible) => { + if (visible) { + setLoading(true); + let result = await handleGetOptions(); + result = cascadeOption(result); + setLoading(false); + setOptions(result); + } + }; + const filter = (inputValue: string, path) => path.some((option) => (option.label as string).includes(inputValue)); + return ( + .ant-space-item { + width: 100%; + } + `} + > + handleSelect(option)} + changeOnSelect + placeholder="Please select" + /> + + ); +}); +const AssociationCascadeSelect = connect((props: any) => { + return ( +
+ +
+ ); +}); + +export const InternalCascader = observer( + (props: any) => { + const { options: collectionField } = useAssociationFieldContext(); + const selectForm = useMemo(() => createForm(), []); + const { t } = useTranslation(); + const field: any = useField(); + const fieldSchema = useFieldSchema(); + useEffect(() => { + const id = uid(); + selectForm.addEffects(id, () => { + onFormValuesChange((form) => { + if (collectionField.interface === 'm2o') { + const value = extractLastNonNullValueObjects(form.values?.[fieldSchema.name]); + setTimeout(() => { + form.setValuesIn(fieldSchema.name, value); + props.onChange(value); + field.value = value; + }); + } else { + const value = extractLastNonNullValueObjects(form.values?.select_array).filter( + (v) => v && Object.keys(v).length > 0, + ); + setTimeout(() => { + field.value = value; + props.onChange(value); + }); + } + }); + }); + return () => { + selectForm.removeEffects(id); + }; + }, []); + const toValue = () => { + if (Array.isArray(field.value) && field.value.length > 0) { + return field.value; + } + return [{}]; + }; + const defaultValue = toValue(); + const schema = { + type: 'object', + properties: { + select_array: { + type: 'array', + 'x-component': 'ArrayItems', + 'x-decorator': 'FormItem', + default: defaultValue, + items: { + type: 'void', + 'x-component': 'Space', + properties: { + sort: { + type: 'void', + 'x-decorator': 'FormItem', + 'x-component': 'ArrayItems.SortHandle', + }, + select: { + type: 'string', + 'x-decorator': 'FormItem', + 'x-component': AssociationCascadeSelect, + 'x-component-props': { + ...props, + style: { width: '100%' }, + }, + }, + remove: { + type: 'void', + 'x-decorator': 'FormItem', + 'x-component': 'ArrayItems.Remove', + }, + }, + }, + properties: { + add: { + type: 'void', + title: t('Add new'), + 'x-component': 'ArrayItems.Addition', + }, + }, + }, + }, + }; + return ( + + {collectionField.interface === 'm2o' ? ( + + ) : ( + + )} + + ); + }, + { displayName: 'InternalCascade' }, +); + +function extractLastNonNullValueObjects(data, flag?) { + let result = []; + if (!Array.isArray(data)) { + return data; + } + for (const sublist of data) { + let lastNonNullValue = null; + if (Array.isArray(sublist)) { + for (let i = sublist?.length - 1; i >= 0; i--) { + if (sublist[i].value) { + lastNonNullValue = sublist[i].value; + break; + } + } + if (lastNonNullValue) { + result.push(lastNonNullValue); + } + } else { + if (sublist?.value) { + lastNonNullValue = sublist.value; + } else { + lastNonNullValue = null; + } + if (lastNonNullValue) { + if (flag) { + result?.push?.(lastNonNullValue); + } else { + result = lastNonNullValue; + } + } else { + result?.push?.(sublist); + } + } + } + return result; +} + +export function transformNestedData(inputData) { + const resultArray = []; + + function recursiveTransform(data) { + if (data?.parent) { + const { parent } = data; + recursiveTransform(parent); + } + const { parent, ...other } = data; + resultArray.push(other); + } + if (inputData) { + recursiveTransform(inputData); + } + return resultArray; +} diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalViewer.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalViewer.tsx index c6c89a8ef..f881453a4 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalViewer.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalViewer.tsx @@ -55,7 +55,12 @@ export const ReadPrettyInternalViewer: React.FC = observer( .map((o) => o?.[fieldNames?.label || 'label']) .join(' / ') : isObject(value) - ? JSON.stringify(value) + ? getCollection(targetCollection?.fieldsMap?.[fieldNames?.label || 'label']?.target)?.options?.titleField + ? value[ + getCollection(targetCollection?.fieldsMap?.[fieldNames?.label || 'label']?.target)?.options + ?.titleField + ] + : JSON.stringify(value) : value; const val = toValue(compile(label), 'N/A'); const labelUiSchema = getLabelUiSchema( diff --git a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx index ff815c84b..14a860916 100644 --- a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx @@ -158,7 +158,7 @@ export const SubTable: any = observer( showIndex dragSort={field.editable} showDel={field.editable} - pagination={false} + pagination={!!field.componentProps.pagination} rowSelection={{ type: 'none', hideSelectAll: true }} footer={() => field.editable && ( diff --git a/packages/core/client/src/schema-component/antd/custom-cascader/CustomCascader.tsx b/packages/core/client/src/schema-component/antd/custom-cascader/CustomCascader.tsx new file mode 100644 index 000000000..c5570c626 --- /dev/null +++ b/packages/core/client/src/schema-component/antd/custom-cascader/CustomCascader.tsx @@ -0,0 +1,61 @@ +import { LoadingOutlined } from '@ant-design/icons'; +import { ArrayField } from '@formily/core'; +import { connect, mapProps, mapReadPretty, useField } from '@formily/react'; +import { toArr } from '@formily/shared'; +import { Cascader as AntdCascader, Space } from 'antd'; +import { isBoolean, omit } from 'lodash'; +import React from 'react'; +import { useRequest } from '../../../api-client'; +import { ReadPretty } from './ReadPretty'; +import { defaultFieldNames } from './defaultFieldNames'; + +const useDefDataSource = (options) => { + const field = useField(); + return useRequest(() => Promise.resolve({ data: field.dataSource || [] }), options); +}; + +const useDefLoadData = (props: any) => { + return props?.loadData; +}; + +export const CustomCascader = connect( + (props: any) => { + const field = useField(); + const { + value, + onChange, + labelInValue, + // fieldNames = defaultFieldNames, + useDataSource = useDefDataSource, + useLoadData = useDefLoadData, + changeOnSelectLast, + changeOnSelect, + maxLevel, + defaultValue, + ...others + } = props; + return ( + + ); + }, + mapProps( + { + dataSource: 'options', + }, + (props, field) => { + return { + ...props, + suffixIcon: field?.['loading'] || field?.['validating'] ? : props.suffixIcon, + }; + }, + ), + mapReadPretty(ReadPretty), +); + +export default CustomCascader; diff --git a/packages/core/client/src/schema-component/antd/custom-cascader/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/custom-cascader/ReadPretty.tsx new file mode 100644 index 000000000..aa4457e96 --- /dev/null +++ b/packages/core/client/src/schema-component/antd/custom-cascader/ReadPretty.tsx @@ -0,0 +1,35 @@ +import { ArrayField } from '@formily/core'; +import { useField } from '@formily/react'; +import { toArr } from '@formily/shared'; +import React from 'react'; +import { defaultFieldNames } from './defaultFieldNames'; + +export const ReadPretty: React.FC = (props: any) => { + const { fieldNames = defaultFieldNames } = props; + const values = toArr(props.value); + const len = values.length; + const field = useField(); + let dataSource = field.dataSource; + const data = []; + for (const item of values) { + if (typeof item === 'object') { + data.push(item); + } else { + const curr = dataSource?.find((v) => v[fieldNames.value] === item); + dataSource = curr?.[fieldNames.children] || []; + data.push(curr || { label: item, value: item }); + } + } + return ( +
+ {data.map((item, index) => { + return ( + + {typeof item === 'object' ? item[fieldNames.label] : item} + {len > index + 1 && ' / '} + + ); + })} +
+ ); +}; diff --git a/packages/core/client/src/schema-component/antd/custom-cascader/defaultFieldNames.ts b/packages/core/client/src/schema-component/antd/custom-cascader/defaultFieldNames.ts new file mode 100644 index 000000000..da692434e --- /dev/null +++ b/packages/core/client/src/schema-component/antd/custom-cascader/defaultFieldNames.ts @@ -0,0 +1,5 @@ +export const defaultFieldNames = { + label: 'label', + value: 'value', + children: 'children', +}; diff --git a/packages/core/client/src/schema-component/antd/custom-cascader/index.md b/packages/core/client/src/schema-component/antd/custom-cascader/index.md new file mode 100644 index 000000000..abaeae227 --- /dev/null +++ b/packages/core/client/src/schema-component/antd/custom-cascader/index.md @@ -0,0 +1,36 @@ +--- +group: + title: Schema Components + order: 3 +--- + +# Cascader + +## Examples + +### Cascader + + + +### Asynchronous Data Source + + + +## API + +基于 antd 的 [Cascader](https://ant.design/components/cascader/#API) 附加的一些属性: + +- `labelInValue` 是否把每个选项的 label 包装到 value 中 +- `changeOnSelectLast` 必须选到最后一级 +- `useLoadData` 可调用 hook 的 loadData + +```ts +{ + useLoadData: (props) => { + // 这里可以写 hook + return function loadData(selectedOptions) { + // Cascader 的 loadData + } + } +} +``` diff --git a/packages/core/client/src/schema-component/antd/custom-cascader/index.ts b/packages/core/client/src/schema-component/antd/custom-cascader/index.ts new file mode 100644 index 000000000..4d26e0d20 --- /dev/null +++ b/packages/core/client/src/schema-component/antd/custom-cascader/index.ts @@ -0,0 +1 @@ +export * from './CustomCascader'; diff --git a/packages/core/client/src/schema-component/antd/form-item/FormItem.Settings.tsx b/packages/core/client/src/schema-component/antd/form-item/FormItem.Settings.tsx index 5f669056f..e4bc65c41 100644 --- a/packages/core/client/src/schema-component/antd/form-item/FormItem.Settings.tsx +++ b/packages/core/client/src/schema-component/antd/form-item/FormItem.Settings.tsx @@ -1012,13 +1012,9 @@ export function useTitleFieldOptions() { const targetFields = collectionField?.target ? getCollectionFields(collectionField?.target) : getCollectionFields(collectionField?.targetCollection) ?? []; - const options = targetFields - .filter((field) => { - return isTitleField(field); - }) - .map((field) => ({ - value: field?.name, - label: compile(field?.uiSchema?.title) || field?.name, - })); + const options = targetFields.map((field) => ({ + value: field?.name, + label: compile(field?.uiSchema?.title) || field?.name, + })); return options; } diff --git a/packages/core/client/src/schema-component/antd/grid/Grid.tsx b/packages/core/client/src/schema-component/antd/grid/Grid.tsx index fe2edbfff..223dbe2aa 100644 --- a/packages/core/client/src/schema-component/antd/grid/Grid.tsx +++ b/packages/core/client/src/schema-component/antd/grid/Grid.tsx @@ -160,6 +160,7 @@ const ColDivider = (props) => { ref={setDraggableNodeRef} {...listeners} {...attributes} + tabIndex={-1} className={props.first || props.last || !designable ? null : 'DraggableNode'} > diff --git a/packages/core/client/src/schema-component/antd/index.ts b/packages/core/client/src/schema-component/antd/index.ts index 9e75092e1..f4e60905c 100644 --- a/packages/core/client/src/schema-component/antd/index.ts +++ b/packages/core/client/src/schema-component/antd/index.ts @@ -50,5 +50,6 @@ export * from './time-picker'; export * from './tree-select'; export * from './upload'; export * from './variable'; +export * from './custom-cascader'; import './index.less'; diff --git a/packages/core/client/src/schema-component/antd/space/index.tsx b/packages/core/client/src/schema-component/antd/space/index.tsx index c53d0b2c4..21e8bbf78 100644 --- a/packages/core/client/src/schema-component/antd/space/index.tsx +++ b/packages/core/client/src/schema-component/antd/space/index.tsx @@ -5,7 +5,7 @@ import React from 'react'; export const Space: React.FC = (props) => { let { split } = props; if (split === '|') { - split = ; + split =  ; } const layout = useFormLayout(); return React.createElement(AntdSpace, { diff --git a/packages/core/client/src/schema-component/antd/table-v2/Table.Column.Designer.tsx b/packages/core/client/src/schema-component/antd/table-v2/Table.Column.Designer.tsx index 2a9f42a8f..99850fc9a 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/Table.Column.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/Table.Column.Designer.tsx @@ -30,14 +30,12 @@ export const useLabelFields = (collectionName?: any) => { return []; } const targetFields = getCollectionFields(collectionName); - return targetFields - ?.filter?.((field) => field?.interface && !field?.target && field.type !== 'boolean' && !field.isForeignKey) - ?.map?.((field) => { - return { - value: field.name, - label: compile(field?.uiSchema?.title || field.name), - }; - }); + return targetFields?.map?.((field) => { + return { + value: field.name, + label: compile(field?.uiSchema?.title || field.name), + }; + }); }; export const useColorFields = (collectionName?: any) => { @@ -407,6 +405,7 @@ export const TableColumnDesigner = (props) => { /> )} {isAllowToSetDefaultValue(isSubTableColumn) && } + {props.children} const { designable } = useDesignable(); const { exists, render } = useSchemaInitializerRender(schema['x-initializer'], schema['x-initializer-props']); const parentRecordData = useCollectionParentRecordData(); + const dataSource = field?.value?.slice?.()?.filter?.(Boolean) || []; const columns = schema .reduceProperties((buf, s) => { if (isColumnComponent(s) && schemaInWhitelist(Object.values(s.properties || {}).pop())) { @@ -102,9 +103,10 @@ const useTableColumns = (props: { showDel?: boolean; isSubTable?: boolean }) => const tableColumns = columns.concat({ title: render(), + fixed: 'right', dataIndex: 'TABLE_COLUMN_INITIALIZER', key: 'TABLE_COLUMN_INITIALIZER', - render: designable ? () =>
: null, + render: designable ? () => : null, }); if (props.showDel) { @@ -120,6 +122,7 @@ const useTableColumns = (props: { showDel?: boolean; isSubTable?: boolean }) => style={{ cursor: 'pointer' }} onClick={() => { action(() => { + const index = dataSource.indexOf(record); spliceArrayState(field as any, { startIndex: index, deleteCount: 1, @@ -134,7 +137,12 @@ const useTableColumns = (props: { showDel?: boolean; isSubTable?: boolean }) => }, }); } - return tableColumns; + + return [ + ...tableColumns.filter((column) => column.fixed === 'left'), + ...tableColumns.filter((column) => !column.fixed || (column.fixed !== 'left' && column.fixed !== 'right')), + ...tableColumns.filter((column) => column.fixed === 'right'), + ]; }; const SortableRow = (props) => { diff --git a/packages/core/client/src/schema-component/core/RemoteSchemaComponent.tsx b/packages/core/client/src/schema-component/core/RemoteSchemaComponent.tsx index 2c739d8ae..1056f9d7b 100644 --- a/packages/core/client/src/schema-component/core/RemoteSchemaComponent.tsx +++ b/packages/core/client/src/schema-component/core/RemoteSchemaComponent.tsx @@ -46,11 +46,8 @@ const RequestSchemaComponent: React.FC = (props) => reset && reset(); }, }); - if (loading) { - return ; - } - if (hidden) { - return ; + if (loading || hidden) { + return; } return noForm ? ( diff --git a/packages/core/client/src/schema-component/hooks/useFieldModeOptions.tsx b/packages/core/client/src/schema-component/hooks/useFieldModeOptions.tsx index 5a79c4977..12c2fe495 100644 --- a/packages/core/client/src/schema-component/hooks/useFieldModeOptions.tsx +++ b/packages/core/client/src/schema-component/hooks/useFieldModeOptions.tsx @@ -55,6 +55,7 @@ export const useFieldModeOptions = (props?) => { { label: t('Cascade Select'), value: 'CascadeSelect' }, !isTableField && { label: t('Sub-form'), value: 'Nester' }, { label: t('Sub-form(Popover)'), value: 'PopoverNester' }, + { label: t('Cascader'), value: 'Cascader' }, ]; } switch (collectionField.interface) { @@ -101,6 +102,7 @@ export const useFieldModeOptions = (props?) => { { label: t('Record picker'), value: 'Picker' }, !isTableField && { label: t('Sub-form'), value: 'Nester' }, { label: t('Sub-form(Popover)'), value: 'PopoverNester' }, + { label: t('Cascader'), value: 'Cascader' }, ]; default: diff --git a/packages/core/client/src/schema-initializer/items/TableActionColumnInitializer.tsx b/packages/core/client/src/schema-initializer/items/TableActionColumnInitializer.tsx index 604c77935..b955f0472 100644 --- a/packages/core/client/src/schema-initializer/items/TableActionColumnInitializer.tsx +++ b/packages/core/client/src/schema-initializer/items/TableActionColumnInitializer.tsx @@ -9,6 +9,10 @@ export const TableActionColumnInitializer = () => { title: '{{ t("Actions") }}', 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', + 'x-component-props': { + width: 150, + fixed: 'right', + }, 'x-designer': 'TableV2.ActionColumnDesigner', 'x-initializer': 'TableActionColumnInitializers', 'x-action-column': 'actions', diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts index 2704ff435..2733dfcdc 100644 --- a/packages/core/client/src/schema-initializer/utils.ts +++ b/packages/core/client/src/schema-initializer/utils.ts @@ -1159,24 +1159,23 @@ export const createFormBlockSchema = (options) => { useProps: '{{ useFormBlockProps }}', }, properties: { - grid: template || { - type: 'void', - 'x-component': 'Grid', - 'x-initializer': formItemInitializers, - properties: {}, - }, [uid()]: { type: 'void', 'x-initializer': actionInitializers, 'x-component': 'ActionBar', 'x-component-props': { - layout: 'one-column', style: { - marginTop: 24, + marginBottom: 'var(--nb-spacing)', }, }, properties: actions, }, + grid: template || { + type: 'void', + 'x-component': 'Grid', + 'x-initializer': formItemInitializers, + properties: {}, + }, }, }, }, @@ -1381,6 +1380,10 @@ export const createTableBlockSchema = (options) => { 'x-action-column': 'actions', 'x-decorator': 'TableV2.Column.ActionBar', 'x-component': 'TableV2.Column', + 'x-component-props': { + width: 150, + fixed: 'right', + }, 'x-designer': 'TableV2.ActionColumnDesigner', 'x-initializer': tableActionColumnInitializers ?? 'TableActionColumnInitializers', properties: { diff --git a/packages/core/client/src/schema-settings/VariableInput/hooks/useParentRecordVariable.ts b/packages/core/client/src/schema-settings/VariableInput/hooks/useParentRecordVariable.ts index 443ee7fe3..e4ef841c3 100644 --- a/packages/core/client/src/schema-settings/VariableInput/hooks/useParentRecordVariable.ts +++ b/packages/core/client/src/schema-settings/VariableInput/hooks/useParentRecordVariable.ts @@ -31,6 +31,7 @@ export const useParentRecordVariable = (props: Props) => { uiSchema: props.schema, name: '$nParentRecord', title: t('Parent record'), + maxDepth: 5, collectionName: props.collectionName, noDisabled: props.noDisabled, targetFieldSchema: props.targetFieldSchema, diff --git a/packages/core/client/src/unsafe.tsx b/packages/core/client/src/unsafe.tsx new file mode 100644 index 000000000..0611e81a4 --- /dev/null +++ b/packages/core/client/src/unsafe.tsx @@ -0,0 +1,58 @@ +export { + removeGridFormItem, + useInheritsFormItemInitializerFields, + useFormItemInitializerFields, + useAssociatedFormItemInitializerFields, + useFilterInheritsFormItemInitializerFields, + useFilterFormItemInitializerFields, +} from './schema-initializer/utils'; +export { parseVariables } from './schema-component/common/utils/uitls'; +export { linkageAction } from './schema-component/antd/action/utils'; +export { useCollectionState } from './schema-settings/DataTemplates/hooks/useCollectionState'; +export { useSyncFromForm } from './schema-settings/DataTemplates/utils'; +export { ColumnFieldProvider } from './schema-component/antd/table-v2/components/ColumnFieldProvider'; +export { default as schema } from './schema-component/antd/association-field/schema'; +export { ReadPrettyInternalViewer } from './schema-component/antd/association-field/InternalViewer'; +export { useSetAriaLabelForPopover } from './schema-component/antd/action/hooks/useSetAriaLabelForPopover'; +export { InternalFileManager } from './schema-component/antd/association-field/FileManager'; +export { CreateRecordAction } from './schema-component/antd/association-field/components/CreateRecordAction'; +export { AssociationSelect } from './schema-component/antd/association-field/AssociationSelect'; +export { AssociationFieldProvider } from './schema-component/antd/association-field/AssociationFieldProvider'; +export { InternalCascadeSelect } from './schema-component/antd/association-field/InternalCascadeSelect'; +export { InternalNester } from './schema-component/antd/association-field/InternalNester'; +export { InternalPicker } from './schema-component/antd/association-field/InternalPicker'; +export { InternalSubTable } from './schema-component/antd/association-field/InternalSubTable'; +export { InternaPopoverNester } from './schema-component/antd/association-field/InternalPopoverNester'; +export { InternalCascader } from './schema-component/antd/association-field/InternalCascader'; +export { Nester } from './schema-component/antd/association-field/Nester'; +export { SubTable } from './schema-component/antd/association-field/SubTable'; +export { ReadPretty } from './schema-component/antd/association-field/ReadPretty'; +export { SubFormProvider } from './schema-component/antd/association-field/hooks'; +export { useAssociationFieldContext } from './schema-component/antd/association-field/hooks'; +export { FlagProvider } from './flag-provider'; +export { isVariable } from './variables/utils/isVariable'; +export { transformVariableValue } from './variables/utils/transformVariableValue'; +export { useVariables } from './variables'; +export { VariableInput, getShouldChange } from './schema-settings/VariableInput/VariableInput'; +export { useLocalVariables } from './variables'; +export { VariablesContext } from './variables/VariablesProvider'; +export { + EditComponent, + EditDescription, + EditOperator, + EditTitle, + EditTitleField, + EditTooltip, + EditValidationRules, +} from './schema-component/antd/form-item/SchemaSettingOptions'; +export type { DynamicComponentProps } from './schema-component/antd/filter/DynamicComponent'; +export { DetailsBlockProvider, useDetailsBlockContext } from './block-provider/DetailsBlockProvider'; +export { getInnermostKeyAndValue } from './schema-component/common/utils/uitls'; +export { default as useServiceOptions } from './schema-component/antd/association-field/hooks'; +export type { VariablesContextType, VariableOption } from './variables/types'; +export type { Option } from './schema-settings/VariableInput/type'; +export { useBlockCollection } from './schema-settings/VariableInput/hooks/useBlockCollection'; +export { useValues } from './schema-component/antd/filter/useValues'; +export { useVariableOptions } from './schema-settings/VariableInput/hooks/useVariableOptions'; +export { useContextAssociationFields } from './schema-settings/VariableInput/hooks/useContextAssociationFields'; +export { useRecordVariable } from './schema-settings/VariableInput/hooks/useRecordVariable'; diff --git a/packages/core/client/src/variables/VariablesProvider.tsx b/packages/core/client/src/variables/VariablesProvider.tsx index 3f808aec5..e375733dd 100644 --- a/packages/core/client/src/variables/VariablesProvider.tsx +++ b/packages/core/client/src/variables/VariablesProvider.tsx @@ -77,7 +77,11 @@ const VariablesProvider = ({ children }) => { if (current == null) { return current; } - + if (list[index] === '$nParentRecord') { + if (!(list[index + 1] in current[list[index]]) && '__parent' in current[list[index]]) { + list.splice(1, 0, '__parent'); + } + } const key = list[index]; const associationField: CollectionFieldOptions_deprecated = getCollectionJoinField( getFieldPath(list.slice(0, index + 1).join('.'), _variableToCollectionName), @@ -109,7 +113,12 @@ const VariablesProvider = ({ children }) => { return item?.[key]; }); current = _.flatten(await Promise.all(result)); - } else if (shouldToRequest(current[key]) && current.id != null && associationField?.target) { + } else if ( + shouldToRequest(current[key]) && + current.id != null && + associationField?.target && + associationField?.type != 'virtual' + ) { const url = `/${collectionName}/${current.id}/${key}:${getAction(associationField.type)}`; let data = null; if (hasRequested(url)) { diff --git a/packages/core/create-nocobase-app/package.json b/packages/core/create-nocobase-app/package.json index e1e46b7ae..e08788192 100755 --- a/packages/core/create-nocobase-app/package.json +++ b/packages/core/create-nocobase-app/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "dependencies": { "@umijs/utils": "3.5.20", - "axios": "^0.26.1", + "axios": "^1.6.2", "chalk": "^4.1.1", "commander": "^9.2.0", "tar": "6.1.11" diff --git a/packages/core/database/src/features/referential-integrity-check.ts b/packages/core/database/src/features/referential-integrity-check.ts index b1b1b278e..3bedb152f 100644 --- a/packages/core/database/src/features/referential-integrity-check.ts +++ b/packages/core/database/src/features/referential-integrity-check.ts @@ -42,7 +42,12 @@ export async function referentialIntegrityCheck(options: ReferentialIntegrityChe } if (onDelete === 'RESTRICT') { - throw new Error('RESTRICT'); + const error = new Error( + `此数据被 ${ + sourceCollection.options.title || sourceCollectionName + } 表关联,关联字段(as):${sourceField},不能删除!`, + ); + throw error; } if (onDelete === 'CASCADE') { diff --git a/packages/core/database/src/sql-parser/postgres.js b/packages/core/database/src/sql-parser/postgres.js index 931fa9544..abcb1bdd4 100644 --- a/packages/core/database/src/sql-parser/postgres.js +++ b/packages/core/database/src/sql-parser/postgres.js @@ -196,593 +196,780 @@ function peg$parse(input, options) { var peg$c1 = 'extension'; var peg$c2 = 'schema'; var peg$c3 = 'version'; - var peg$c4 = 'increment'; - var peg$c5 = 'minvalue'; - var peg$c6 = 'no'; - var peg$c7 = 'maxvalue'; - var peg$c8 = 'start'; - var peg$c9 = 'cache'; - var peg$c10 = 'cycle'; - var peg$c11 = 'owned'; - var peg$c12 = 'none'; - var peg$c13 = 'nulls'; - var peg$c14 = 'first'; - var peg$c15 = 'last'; - var peg$c16 = 'auto_increment'; - var peg$c17 = 'unique'; - var peg$c18 = 'key'; - var peg$c19 = 'primary'; - var peg$c20 = 'column_format'; - var peg$c21 = 'fixed'; - var peg$c22 = 'dynamic'; - var peg$c23 = 'default'; - var peg$c24 = 'storage'; - var peg$c25 = 'disk'; - var peg$c26 = 'memory'; - var peg$c27 = 'cascade'; - var peg$c28 = 'restrict'; - var peg$c29 = 'algorithm'; - var peg$c30 = 'instant'; - var peg$c31 = 'inplace'; - var peg$c32 = 'copy'; - var peg$c33 = 'lock'; - var peg$c34 = 'shared'; - var peg$c35 = 'exclusive'; - var peg$c36 = 'primary key'; - var peg$c37 = 'foreign key'; - var peg$c38 = 'match full'; - var peg$c39 = 'match partial'; - var peg$c40 = 'match simple'; - var peg$c41 = 'set null'; - var peg$c42 = 'no action'; - var peg$c43 = 'set default'; - var peg$c44 = 'trigger'; - var peg$c45 = 'before'; - var peg$c46 = 'after'; - var peg$c47 = 'instead of'; - var peg$c48 = 'on'; - var peg$c49 = 'execute'; - var peg$c50 = 'procedure'; - var peg$c51 = 'of'; - var peg$c52 = 'not'; - var peg$c53 = 'deferrable'; - var peg$c54 = 'initially immediate'; - var peg$c55 = 'initially deferred'; - var peg$c56 = 'for'; - var peg$c57 = 'each'; - var peg$c58 = 'row'; - var peg$c59 = 'statement'; - var peg$c60 = 'character'; - var peg$c61 = 'set'; - var peg$c62 = 'charset'; - var peg$c63 = 'collate'; - var peg$c64 = 'avg_row_length'; - var peg$c65 = 'key_block_size'; - var peg$c66 = 'max_rows'; - var peg$c67 = 'min_rows'; - var peg$c68 = 'stats_sample_pages'; - var peg$c69 = 'connection'; - var peg$c70 = 'compression'; - var peg$c71 = "'"; - var peg$c72 = 'zlib'; - var peg$c73 = 'lz4'; - var peg$c74 = 'engine'; - var peg$c75 = 'in'; - var peg$c76 = 'access share'; - var peg$c77 = 'row share'; - var peg$c78 = 'row exclusive'; - var peg$c79 = 'share update exclusive'; - var peg$c80 = 'share row exclusive'; - var peg$c81 = 'access exclusive'; - var peg$c82 = 'share'; - var peg$c83 = 'mode'; - var peg$c84 = 'nowait'; - var peg$c85 = 'tables'; - var peg$c86 = 'prepare'; - var peg$c87 = ';'; - var peg$c88 = '('; - var peg$c89 = ')'; - var peg$c90 = '"'; - var peg$c91 = 'outfile'; - var peg$c92 = 'dumpfile'; - var peg$c93 = 'btree'; - var peg$c94 = 'hash'; - var peg$c95 = 'gist'; - var peg$c96 = 'gin'; - var peg$c97 = 'with'; - var peg$c98 = 'parser'; - var peg$c99 = 'visible'; - var peg$c100 = 'invisible'; - var peg$c101 = 'lateral'; - var peg$c102 = 'tablesample'; - var peg$c103 = 'repeatable'; - var peg$c104 = 'cross'; - var peg$c105 = 'following'; - var peg$c106 = 'preceding'; - var peg$c107 = 'current'; - var peg$c108 = 'unbounded'; - var peg$c109 = '='; - var peg$c110 = 'conflict'; - var peg$c111 = '!'; - var peg$c112 = '>='; - var peg$c113 = '>'; - var peg$c114 = '<='; - var peg$c115 = '<>'; - var peg$c116 = '<'; - var peg$c117 = '!='; - var peg$c118 = 'similar'; - var peg$c119 = 'escape'; - var peg$c120 = '@>'; - var peg$c121 = '<@'; - var peg$c122 = '?'; - var peg$c123 = '?|'; - var peg$c124 = '?&'; - var peg$c125 = '#-'; - var peg$c126 = '+'; - var peg$c127 = '-'; - var peg$c128 = '*'; - var peg$c129 = '/'; - var peg$c130 = '%'; - var peg$c131 = '||'; - var peg$c132 = '$'; - var peg$c133 = 'e'; - var peg$c134 = '`'; - var peg$c135 = ':'; - var peg$c136 = 'over'; - var peg$c137 = 'filter'; - var peg$c138 = 'first_value'; - var peg$c139 = 'last_value'; - var peg$c140 = 'row_number'; - var peg$c141 = 'dense_rank'; - var peg$c142 = 'rank'; - var peg$c143 = 'lag'; - var peg$c144 = 'lead'; - var peg$c145 = 'nth_value'; - var peg$c146 = 'ignore'; - var peg$c147 = 'respect'; - var peg$c148 = 'percentile_cont'; - var peg$c149 = 'percentile_disc'; - var peg$c150 = 'within'; - var peg$c151 = 'separator'; - var peg$c152 = 'both'; - var peg$c153 = 'leading'; - var peg$c154 = 'trailing'; - var peg$c155 = 'trim'; - var peg$c156 = 'now'; - var peg$c157 = 'at'; - var peg$c158 = 'zone'; - var peg$c159 = 'century'; - var peg$c160 = 'day'; - var peg$c161 = 'date'; - var peg$c162 = 'decade'; - var peg$c163 = 'dow'; - var peg$c164 = 'doy'; - var peg$c165 = 'epoch'; - var peg$c166 = 'hour'; - var peg$c167 = 'isodow'; - var peg$c168 = 'isoyear'; - var peg$c169 = 'microseconds'; - var peg$c170 = 'millennium'; - var peg$c171 = 'milliseconds'; - var peg$c172 = 'minute'; - var peg$c173 = 'month'; - var peg$c174 = 'quarter'; - var peg$c175 = 'second'; - var peg$c176 = 'timezone'; - var peg$c177 = 'timezone_hour'; - var peg$c178 = 'timezone_minute'; - var peg$c179 = 'week'; - var peg$c180 = 'year'; - var peg$c181 = 'ntile'; - var peg$c182 = "\\'"; - var peg$c183 = '\\"'; - var peg$c184 = '\\\\'; - var peg$c185 = '\\/'; - var peg$c186 = '\\b'; - var peg$c187 = '\\f'; - var peg$c188 = '\\n'; - var peg$c189 = '\\r'; - var peg$c190 = '\\t'; - var peg$c191 = '\\u'; - var peg$c192 = '\\'; - var peg$c193 = "''"; - var peg$c194 = '.'; - var peg$c195 = 'null'; - var peg$c196 = 'not null'; - var peg$c197 = 'true'; - var peg$c198 = 'to'; - var peg$c199 = 'false'; - var peg$c200 = 'show'; - var peg$c201 = 'drop'; - var peg$c202 = 'use'; - var peg$c203 = 'alter'; - var peg$c204 = 'select'; - var peg$c205 = 'update'; - var peg$c206 = 'create'; - var peg$c207 = 'temporary'; - var peg$c208 = 'temp'; - var peg$c209 = 'delete'; - var peg$c210 = 'insert'; - var peg$c211 = 'RECURSIVE'; - var peg$c212 = 'replace'; - var peg$c213 = 'returning'; - var peg$c214 = 'rename'; - var peg$c215 = 'explain'; - var peg$c216 = 'partition'; - var peg$c217 = 'into'; - var peg$c218 = 'from'; - var peg$c219 = 'as'; - var peg$c220 = 'table'; - var peg$c221 = 'database'; - var peg$c222 = 'scheme'; - var peg$c223 = 'sequence'; - var peg$c224 = 'tablespace'; - var peg$c225 = 'deallocate'; - var peg$c226 = 'left'; - var peg$c227 = 'right'; - var peg$c228 = 'full'; - var peg$c229 = 'inner'; - var peg$c230 = 'join'; - var peg$c231 = 'outer'; - var peg$c232 = 'union'; - var peg$c233 = 'values'; - var peg$c234 = 'using'; - var peg$c235 = 'where'; - var peg$c236 = 'group'; - var peg$c237 = 'by'; - var peg$c238 = 'order'; - var peg$c239 = 'having'; - var peg$c240 = 'window'; - var peg$c241 = 'limit'; - var peg$c242 = 'offset'; - var peg$c243 = 'asc'; - var peg$c244 = 'desc'; - var peg$c245 = 'all'; - var peg$c246 = 'distinct'; - var peg$c247 = 'between'; - var peg$c248 = 'is'; - var peg$c249 = 'like'; - var peg$c250 = 'ilike'; - var peg$c251 = 'exists'; - var peg$c252 = 'and'; - var peg$c253 = 'or'; - var peg$c254 = 'array'; - var peg$c255 = 'array_agg'; - var peg$c256 = 'count'; - var peg$c257 = 'group_concat'; - var peg$c258 = 'max'; - var peg$c259 = 'min'; - var peg$c260 = 'sum'; - var peg$c261 = 'avg'; - var peg$c262 = 'extract'; - var peg$c263 = 'call'; - var peg$c264 = 'case'; - var peg$c265 = 'when'; - var peg$c266 = 'then'; - var peg$c267 = 'else'; - var peg$c268 = 'end'; - var peg$c269 = 'cast'; - var peg$c270 = 'bool'; - var peg$c271 = 'boolean'; - var peg$c272 = 'char'; - var peg$c273 = 'varchar'; - var peg$c274 = 'numeric'; - var peg$c275 = 'decimal'; - var peg$c276 = 'signed'; - var peg$c277 = 'unsigned'; - var peg$c278 = 'int'; - var peg$c279 = 'zerofill'; - var peg$c280 = 'integer'; - var peg$c281 = 'json'; - var peg$c282 = 'jsonb'; - var peg$c283 = 'geometry'; - var peg$c284 = 'smallint'; - var peg$c285 = 'serial'; - var peg$c286 = 'tinyint'; - var peg$c287 = 'tinytext'; - var peg$c288 = 'text'; - var peg$c289 = 'mediumtext'; - var peg$c290 = 'longtext'; - var peg$c291 = 'bigint'; - var peg$c292 = 'enum'; - var peg$c293 = 'float'; - var peg$c294 = 'double'; - var peg$c295 = 'bigserial'; - var peg$c296 = 'real'; - var peg$c297 = 'datetime'; - var peg$c298 = 'rows'; - var peg$c299 = 'time'; - var peg$c300 = 'timestamp'; - var peg$c301 = 'truncate'; - var peg$c302 = 'user'; - var peg$c303 = 'uuid'; - var peg$c304 = 'oid'; - var peg$c305 = 'regclass'; - var peg$c306 = 'regcollation'; - var peg$c307 = 'regconfig'; - var peg$c308 = 'regdictionary'; - var peg$c309 = 'regnamespace'; - var peg$c310 = 'regoper'; - var peg$c311 = 'regoperator'; - var peg$c312 = 'regproc'; - var peg$c313 = 'regprocedure'; - var peg$c314 = 'regrole'; - var peg$c315 = 'regtype'; - var peg$c316 = 'current_date'; - var peg$c317 = 'adddate'; - var peg$c318 = 'interval'; - var peg$c319 = 'current_time'; - var peg$c320 = 'current_timestamp'; - var peg$c321 = 'current_user'; - var peg$c322 = 'session_user'; - var peg$c323 = 'system_user'; - var peg$c324 = 'global'; - var peg$c325 = 'session'; - var peg$c326 = 'local'; - var peg$c327 = 'persist'; - var peg$c328 = 'persist_only'; - var peg$c329 = '@'; - var peg$c330 = '@@'; - var peg$c331 = '$$'; - var peg$c332 = 'return'; - var peg$c333 = ':='; - var peg$c334 = '::'; - var peg$c335 = 'dual'; - var peg$c336 = 'add'; - var peg$c337 = 'column'; - var peg$c338 = 'index'; - var peg$c339 = 'fulltext'; - var peg$c340 = 'spatial'; - var peg$c341 = 'comment'; - var peg$c342 = 'constraint'; - var peg$c343 = 'concurrently'; - var peg$c344 = 'references'; - var peg$c345 = 'sql_calc_found_rows'; - var peg$c346 = 'sql_cache'; - var peg$c347 = 'sql_no_cache'; - var peg$c348 = 'sql_small_result'; - var peg$c349 = 'sql_big_result'; - var peg$c350 = 'sql_buffer_result'; - var peg$c351 = ','; - var peg$c352 = '['; - var peg$c353 = ']'; - var peg$c354 = '->'; - var peg$c355 = '->>'; - var peg$c356 = '#>'; - var peg$c357 = '#>>'; - var peg$c358 = '&&'; - var peg$c359 = '/*'; - var peg$c360 = '*/'; - var peg$c361 = '--'; - var peg$c362 = '#'; - var peg$c363 = 'bytea'; - var peg$c364 = 'without'; + var peg$c4 = 'cascaded'; + var peg$c5 = 'local'; + var peg$c6 = 'check'; + var peg$c7 = 'OPTION'; + var peg$c8 = 'check_option'; + var peg$c9 = 'security_barrier'; + var peg$c10 = 'security_invoker'; + var peg$c11 = 'sfunc'; + var peg$c12 = 'stype'; + var peg$c13 = 'aggregate'; + var peg$c14 = 'returns'; + var peg$c15 = 'setof'; + var peg$c16 = 'constant'; + var peg$c17 = ':='; + var peg$c18 = 'begin'; + var peg$c19 = 'declare'; + var peg$c20 = 'LANGUAGE'; + var peg$c21 = 'transorm'; + var peg$c22 = 'FOR'; + var peg$c23 = 'TYPE'; + var peg$c24 = 'window'; + var peg$c25 = 'immutable'; + var peg$c26 = 'stable'; + var peg$c27 = 'volatile'; + var peg$c28 = 'strict'; + var peg$c29 = 'not'; + var peg$c30 = 'leakproof'; + var peg$c31 = 'called'; + var peg$c32 = 'null'; + var peg$c33 = 'on'; + var peg$c34 = 'input'; + var peg$c35 = 'external'; + var peg$c36 = 'security'; + var peg$c37 = 'invoker'; + var peg$c38 = 'definer'; + var peg$c39 = 'parallel'; + var peg$c40 = 'unsafe'; + var peg$c41 = 'restricted'; + var peg$c42 = 'safe'; + var peg$c43 = 'cost'; + var peg$c44 = 'rows'; + var peg$c45 = 'support'; + var peg$c46 = 'to'; + var peg$c47 = '='; + var peg$c48 = 'current'; + var peg$c49 = 'function'; + var peg$c50 = 'type'; + var peg$c51 = 'domain'; + var peg$c52 = 'increment'; + var peg$c53 = 'minvalue'; + var peg$c54 = 'no'; + var peg$c55 = 'maxvalue'; + var peg$c56 = 'start'; + var peg$c57 = 'cache'; + var peg$c58 = 'cycle'; + var peg$c59 = 'owned'; + var peg$c60 = 'none'; + var peg$c61 = 'nulls'; + var peg$c62 = 'first'; + var peg$c63 = 'last'; + var peg$c64 = 'auto_increment'; + var peg$c65 = 'unique'; + var peg$c66 = 'key'; + var peg$c67 = 'primary'; + var peg$c68 = 'column_format'; + var peg$c69 = 'fixed'; + var peg$c70 = 'dynamic'; + var peg$c71 = 'default'; + var peg$c72 = 'storage'; + var peg$c73 = 'disk'; + var peg$c74 = 'memory'; + var peg$c75 = 'cascade'; + var peg$c76 = 'restrict'; + var peg$c77 = 'out'; + var peg$c78 = 'variadic'; + var peg$c79 = 'inout'; + var peg$c80 = 'owner'; + var peg$c81 = 'current_role'; + var peg$c82 = 'current_user'; + var peg$c83 = 'session_user'; + var peg$c84 = 'algorithm'; + var peg$c85 = 'instant'; + var peg$c86 = 'inplace'; + var peg$c87 = 'copy'; + var peg$c88 = 'lock'; + var peg$c89 = 'shared'; + var peg$c90 = 'exclusive'; + var peg$c91 = 'primary key'; + var peg$c92 = 'foreign key'; + var peg$c93 = 'match full'; + var peg$c94 = 'match partial'; + var peg$c95 = 'match simple'; + var peg$c96 = 'set null'; + var peg$c97 = 'no action'; + var peg$c98 = 'set default'; + var peg$c99 = 'trigger'; + var peg$c100 = 'before'; + var peg$c101 = 'after'; + var peg$c102 = 'instead of'; + var peg$c103 = 'execute'; + var peg$c104 = 'procedure'; + var peg$c105 = 'of'; + var peg$c106 = 'deferrable'; + var peg$c107 = 'initially immediate'; + var peg$c108 = 'initially deferred'; + var peg$c109 = 'for'; + var peg$c110 = 'each'; + var peg$c111 = 'row'; + var peg$c112 = 'statement'; + var peg$c113 = 'character'; + var peg$c114 = 'set'; + var peg$c115 = 'charset'; + var peg$c116 = 'collate'; + var peg$c117 = 'avg_row_length'; + var peg$c118 = 'key_block_size'; + var peg$c119 = 'max_rows'; + var peg$c120 = 'min_rows'; + var peg$c121 = 'stats_sample_pages'; + var peg$c122 = 'connection'; + var peg$c123 = 'compression'; + var peg$c124 = "'"; + var peg$c125 = 'zlib'; + var peg$c126 = 'lz4'; + var peg$c127 = 'engine'; + var peg$c128 = 'in'; + var peg$c129 = 'access share'; + var peg$c130 = 'row share'; + var peg$c131 = 'row exclusive'; + var peg$c132 = 'share update exclusive'; + var peg$c133 = 'share row exclusive'; + var peg$c134 = 'access exclusive'; + var peg$c135 = 'share'; + var peg$c136 = 'mode'; + var peg$c137 = 'nowait'; + var peg$c138 = 'tables'; + var peg$c139 = 'prepare'; + var peg$c140 = 'usage'; + var peg$c141 = 'connect'; + var peg$c142 = 'privileges'; + var peg$c143 = 'sequence'; + var peg$c144 = 'database'; + var peg$c145 = 'DOMAIN'; + var peg$c146 = 'FUNCTION'; + var peg$c147 = 'routine'; + var peg$c148 = 'language'; + var peg$c149 = 'large'; + var peg$c150 = 'SCHEMA'; + var peg$c151 = 'functions'; + var peg$c152 = 'procedures'; + var peg$c153 = 'routines'; + var peg$c154 = 'public'; + var peg$c155 = 'grant'; + var peg$c156 = 'option'; + var peg$c157 = 'admin'; + var peg$c158 = 'revoke'; + var peg$c159 = 'elseif'; + var peg$c160 = 'then'; + var peg$c161 = 'end'; + var peg$c162 = 'debug'; + var peg$c163 = 'log'; + var peg$c164 = 'info'; + var peg$c165 = 'notice'; + var peg$c166 = 'warning'; + var peg$c167 = 'exception'; + var peg$c168 = 'message'; + var peg$c169 = 'detail'; + var peg$c170 = 'hint'; + var peg$c171 = 'errcode'; + var peg$c172 = 'column'; + var peg$c173 = 'constraint'; + var peg$c174 = 'datatype'; + var peg$c175 = 'table'; + var peg$c176 = 'sqlstate'; + var peg$c177 = 'raise'; + var peg$c178 = 'loop'; + var peg$c179 = ';'; + var peg$c180 = '('; + var peg$c181 = ')'; + var peg$c182 = '"'; + var peg$c183 = 'outfile'; + var peg$c184 = 'dumpfile'; + var peg$c185 = 'btree'; + var peg$c186 = 'hash'; + var peg$c187 = 'gist'; + var peg$c188 = 'gin'; + var peg$c189 = 'with'; + var peg$c190 = 'parser'; + var peg$c191 = 'visible'; + var peg$c192 = 'invisible'; + var peg$c193 = 'lateral'; + var peg$c194 = 'tablesample'; + var peg$c195 = 'repeatable'; + var peg$c196 = 'cross'; + var peg$c197 = 'following'; + var peg$c198 = 'preceding'; + var peg$c199 = 'unbounded'; + var peg$c200 = 'do'; + var peg$c201 = 'nothing'; + var peg$c202 = 'conflict'; + var peg$c203 = '!'; + var peg$c204 = '>='; + var peg$c205 = '>'; + var peg$c206 = '<='; + var peg$c207 = '<>'; + var peg$c208 = '<'; + var peg$c209 = '!='; + var peg$c210 = 'similar'; + var peg$c211 = '!~*'; + var peg$c212 = '~*'; + var peg$c213 = '~'; + var peg$c214 = '!~'; + var peg$c215 = 'escape'; + var peg$c216 = '@>'; + var peg$c217 = '<@'; + var peg$c218 = '?'; + var peg$c219 = '?|'; + var peg$c220 = '?&'; + var peg$c221 = '#-'; + var peg$c222 = '+'; + var peg$c223 = '-'; + var peg$c224 = '*'; + var peg$c225 = '/'; + var peg$c226 = '%'; + var peg$c227 = '||'; + var peg$c228 = '$'; + var peg$c229 = 'e'; + var peg$c230 = '`'; + var peg$c231 = ':'; + var peg$c232 = 'over'; + var peg$c233 = 'filter'; + var peg$c234 = 'first_value'; + var peg$c235 = 'last_value'; + var peg$c236 = 'row_number'; + var peg$c237 = 'dense_rank'; + var peg$c238 = 'rank'; + var peg$c239 = 'lag'; + var peg$c240 = 'lead'; + var peg$c241 = 'nth_value'; + var peg$c242 = 'ignore'; + var peg$c243 = 'respect'; + var peg$c244 = 'percentile_cont'; + var peg$c245 = 'percentile_disc'; + var peg$c246 = 'within'; + var peg$c247 = 'separator'; + var peg$c248 = 'both'; + var peg$c249 = 'leading'; + var peg$c250 = 'trailing'; + var peg$c251 = 'trim'; + var peg$c252 = 'now'; + var peg$c253 = 'at'; + var peg$c254 = 'zone'; + var peg$c255 = 'century'; + var peg$c256 = 'day'; + var peg$c257 = 'date'; + var peg$c258 = 'decade'; + var peg$c259 = 'dow'; + var peg$c260 = 'doy'; + var peg$c261 = 'epoch'; + var peg$c262 = 'hour'; + var peg$c263 = 'isodow'; + var peg$c264 = 'isoyear'; + var peg$c265 = 'microseconds'; + var peg$c266 = 'millennium'; + var peg$c267 = 'milliseconds'; + var peg$c268 = 'minute'; + var peg$c269 = 'month'; + var peg$c270 = 'quarter'; + var peg$c271 = 'second'; + var peg$c272 = 'timezone'; + var peg$c273 = 'timezone_hour'; + var peg$c274 = 'timezone_minute'; + var peg$c275 = 'week'; + var peg$c276 = 'year'; + var peg$c277 = 'ntile'; + var peg$c278 = "\\'"; + var peg$c279 = '\\"'; + var peg$c280 = '\\\\'; + var peg$c281 = '\\/'; + var peg$c282 = '\\b'; + var peg$c283 = '\\f'; + var peg$c284 = '\\n'; + var peg$c285 = '\\r'; + var peg$c286 = '\\t'; + var peg$c287 = '\\u'; + var peg$c288 = '\\'; + var peg$c289 = "''"; + var peg$c290 = '.'; + var peg$c291 = 'not null'; + var peg$c292 = 'true'; + var peg$c293 = 'false'; + var peg$c294 = 'show'; + var peg$c295 = 'drop'; + var peg$c296 = 'use'; + var peg$c297 = 'alter'; + var peg$c298 = 'select'; + var peg$c299 = 'update'; + var peg$c300 = 'create'; + var peg$c301 = 'temporary'; + var peg$c302 = 'temp'; + var peg$c303 = 'delete'; + var peg$c304 = 'insert'; + var peg$c305 = 'RECURSIVE'; + var peg$c306 = 'replace'; + var peg$c307 = 'returning'; + var peg$c308 = 'rename'; + var peg$c309 = 'explain'; + var peg$c310 = 'partition'; + var peg$c311 = 'into'; + var peg$c312 = 'from'; + var peg$c313 = 'as'; + var peg$c314 = 'tablespace'; + var peg$c315 = 'deallocate'; + var peg$c316 = 'left'; + var peg$c317 = 'right'; + var peg$c318 = 'full'; + var peg$c319 = 'inner'; + var peg$c320 = 'join'; + var peg$c321 = 'outer'; + var peg$c322 = 'union'; + var peg$c323 = 'values'; + var peg$c324 = 'using'; + var peg$c325 = 'where'; + var peg$c326 = 'group'; + var peg$c327 = 'by'; + var peg$c328 = 'order'; + var peg$c329 = 'having'; + var peg$c330 = 'limit'; + var peg$c331 = 'offset'; + var peg$c332 = 'asc'; + var peg$c333 = 'desc'; + var peg$c334 = 'all'; + var peg$c335 = 'distinct'; + var peg$c336 = 'between'; + var peg$c337 = 'is'; + var peg$c338 = 'like'; + var peg$c339 = 'ilike'; + var peg$c340 = 'exists'; + var peg$c341 = 'and'; + var peg$c342 = 'or'; + var peg$c343 = 'array'; + var peg$c344 = 'array_agg'; + var peg$c345 = 'count'; + var peg$c346 = 'group_concat'; + var peg$c347 = 'max'; + var peg$c348 = 'min'; + var peg$c349 = 'sum'; + var peg$c350 = 'avg'; + var peg$c351 = 'extract'; + var peg$c352 = 'call'; + var peg$c353 = 'case'; + var peg$c354 = 'when'; + var peg$c355 = 'else'; + var peg$c356 = 'cast'; + var peg$c357 = 'bool'; + var peg$c358 = 'boolean'; + var peg$c359 = 'char'; + var peg$c360 = 'varchar'; + var peg$c361 = 'numeric'; + var peg$c362 = 'decimal'; + var peg$c363 = 'signed'; + var peg$c364 = 'unsigned'; + var peg$c365 = 'int'; + var peg$c366 = 'zerofill'; + var peg$c367 = 'integer'; + var peg$c368 = 'json'; + var peg$c369 = 'jsonb'; + var peg$c370 = 'geometry'; + var peg$c371 = 'smallint'; + var peg$c372 = 'serial'; + var peg$c373 = 'tinyint'; + var peg$c374 = 'tinytext'; + var peg$c375 = 'text'; + var peg$c376 = 'mediumtext'; + var peg$c377 = 'longtext'; + var peg$c378 = 'bigint'; + var peg$c379 = 'enum'; + var peg$c380 = 'float'; + var peg$c381 = 'double precision'; + var peg$c382 = 'bigserial'; + var peg$c383 = 'real'; + var peg$c384 = 'datetime'; + var peg$c385 = 'time'; + var peg$c386 = 'timestamp'; + var peg$c387 = 'truncate'; + var peg$c388 = 'user'; + var peg$c389 = 'uuid'; + var peg$c390 = 'oid'; + var peg$c391 = 'regclass'; + var peg$c392 = 'regcollation'; + var peg$c393 = 'regconfig'; + var peg$c394 = 'regdictionary'; + var peg$c395 = 'regnamespace'; + var peg$c396 = 'regoper'; + var peg$c397 = 'regoperator'; + var peg$c398 = 'regproc'; + var peg$c399 = 'regprocedure'; + var peg$c400 = 'regrole'; + var peg$c401 = 'regtype'; + var peg$c402 = 'current_date'; + var peg$c403 = 'adddate'; + var peg$c404 = 'interval'; + var peg$c405 = 'current_time'; + var peg$c406 = 'current_timestamp'; + var peg$c407 = 'system_user'; + var peg$c408 = 'global'; + var peg$c409 = 'session'; + var peg$c410 = 'persist'; + var peg$c411 = 'persist_only'; + var peg$c412 = 'view'; + var peg$c413 = '@'; + var peg$c414 = '@@'; + var peg$c415 = '$$'; + var peg$c416 = 'return'; + var peg$c417 = '::'; + var peg$c418 = 'dual'; + var peg$c419 = 'add'; + var peg$c420 = 'index'; + var peg$c421 = 'fulltext'; + var peg$c422 = 'spatial'; + var peg$c423 = 'comment'; + var peg$c424 = 'concurrently'; + var peg$c425 = 'references'; + var peg$c426 = 'sql_calc_found_rows'; + var peg$c427 = 'sql_cache'; + var peg$c428 = 'sql_no_cache'; + var peg$c429 = 'sql_small_result'; + var peg$c430 = 'sql_big_result'; + var peg$c431 = 'sql_buffer_result'; + var peg$c432 = ','; + var peg$c433 = '['; + var peg$c434 = ']'; + var peg$c435 = '->'; + var peg$c436 = '->>'; + var peg$c437 = '#>'; + var peg$c438 = '#>>'; + var peg$c439 = '&&'; + var peg$c440 = '/*'; + var peg$c441 = '*/'; + var peg$c442 = '--'; + var peg$c443 = '#'; + var peg$c444 = 'bytea'; + var peg$c445 = 'varying'; + var peg$c446 = 'without'; + var peg$c447 = 'record'; - var peg$r0 = /^[^"]/; - var peg$r1 = /^[^']/; - var peg$r2 = /^[^`]/; - var peg$r3 = /^[A-Za-z_]/; - var peg$r4 = /^[A-Za-z0-9_\-]/; - var peg$r5 = /^[A-Za-z0-9_]/; - var peg$r6 = /^[\n]/; - var peg$r7 = /^[^"\\\0-\x1F\x7F]/; - var peg$r8 = /^[^'\\]/; - var peg$r9 = /^[\n\r]/; - var peg$r10 = /^[0-9]/; - var peg$r11 = /^[0-9a-fA-F]/; - var peg$r12 = /^[eE]/; - var peg$r13 = /^[+\-]/; - var peg$r14 = /^[ \t\n\r]/; - var peg$r15 = /^[^$]/; + var peg$r0 = /^[^ s\t\n\r]/; + var peg$r1 = /^[^ s\t\n\r;]/; + var peg$r2 = /^[^"]/; + var peg$r3 = /^[^']/; + var peg$r4 = /^[^`]/; + var peg$r5 = /^[A-Za-z_\u4E00-\u9FA5]/; + var peg$r6 = /^[A-Za-z0-9_\-$\u4E00-\u9FA5\xC0-\u017F]/; + var peg$r7 = /^[A-Za-z0-9_\u4E00-\u9FA5]/; + var peg$r8 = /^[\n]/; + var peg$r9 = /^[^"\\\0-\x1F\x7F]/; + var peg$r10 = /^[^'\\]/; + var peg$r11 = /^[\n\r]/; + var peg$r12 = /^[0-9]/; + var peg$r13 = /^[0-9a-fA-F]/; + var peg$r14 = /^[eE]/; + var peg$r15 = /^[+\-]/; + var peg$r16 = /^[ \t\n\r]/; + var peg$r17 = /^[^$]/; var peg$e0 = peg$literalExpectation('IF', true); var peg$e1 = peg$literalExpectation('EXTENSION', true); var peg$e2 = peg$literalExpectation('SCHEMA', true); var peg$e3 = peg$literalExpectation('VERSION', true); - var peg$e4 = peg$literalExpectation('INCREMENT', true); - var peg$e5 = peg$literalExpectation('MINVALUE', true); - var peg$e6 = peg$literalExpectation('NO', true); - var peg$e7 = peg$literalExpectation('MAXVALUE', true); - var peg$e8 = peg$literalExpectation('START', true); - var peg$e9 = peg$literalExpectation('CACHE', true); - var peg$e10 = peg$literalExpectation('CYCLE', true); - var peg$e11 = peg$literalExpectation('OWNED', true); - var peg$e12 = peg$literalExpectation('NONE', true); - var peg$e13 = peg$literalExpectation('NULLS', true); - var peg$e14 = peg$literalExpectation('FIRST', true); - var peg$e15 = peg$literalExpectation('LAST', true); - var peg$e16 = peg$literalExpectation('AUTO_INCREMENT', true); - var peg$e17 = peg$literalExpectation('UNIQUE', true); - var peg$e18 = peg$literalExpectation('KEY', true); - var peg$e19 = peg$literalExpectation('PRIMARY', true); - var peg$e20 = peg$literalExpectation('COLUMN_FORMAT', true); - var peg$e21 = peg$literalExpectation('FIXED', true); - var peg$e22 = peg$literalExpectation('DYNAMIC', true); - var peg$e23 = peg$literalExpectation('DEFAULT', true); - var peg$e24 = peg$literalExpectation('STORAGE', true); - var peg$e25 = peg$literalExpectation('DISK', true); - var peg$e26 = peg$literalExpectation('MEMORY', true); - var peg$e27 = peg$literalExpectation('CASCADE', true); - var peg$e28 = peg$literalExpectation('RESTRICT', true); - var peg$e29 = peg$literalExpectation('ALGORITHM', true); - var peg$e30 = peg$literalExpectation('INSTANT', true); - var peg$e31 = peg$literalExpectation('INPLACE', true); - var peg$e32 = peg$literalExpectation('COPY', true); - var peg$e33 = peg$literalExpectation('LOCK', true); - var peg$e34 = peg$literalExpectation('SHARED', true); - var peg$e35 = peg$literalExpectation('EXCLUSIVE', true); - var peg$e36 = peg$literalExpectation('PRIMARY KEY', true); - var peg$e37 = peg$literalExpectation('FOREIGN KEY', true); - var peg$e38 = peg$literalExpectation('MATCH FULL', true); - var peg$e39 = peg$literalExpectation('MATCH PARTIAL', true); - var peg$e40 = peg$literalExpectation('MATCH SIMPLE', true); - var peg$e41 = peg$literalExpectation('SET NULL', true); - var peg$e42 = peg$literalExpectation('NO ACTION', true); - var peg$e43 = peg$literalExpectation('SET DEFAULT', true); - var peg$e44 = peg$literalExpectation('TRIGGER', true); - var peg$e45 = peg$literalExpectation('BEFORE', true); - var peg$e46 = peg$literalExpectation('AFTER', true); - var peg$e47 = peg$literalExpectation('INSTEAD OF', true); - var peg$e48 = peg$literalExpectation('ON', true); - var peg$e49 = peg$literalExpectation('EXECUTE', true); - var peg$e50 = peg$literalExpectation('PROCEDURE', true); - var peg$e51 = peg$literalExpectation('OF', true); - var peg$e52 = peg$literalExpectation('NOT', true); - var peg$e53 = peg$literalExpectation('DEFERRABLE', true); - var peg$e54 = peg$literalExpectation('INITIALLY IMMEDIATE', true); - var peg$e55 = peg$literalExpectation('INITIALLY DEFERRED', true); - var peg$e56 = peg$literalExpectation('FOR', true); - var peg$e57 = peg$literalExpectation('EACH', true); - var peg$e58 = peg$literalExpectation('ROW', true); - var peg$e59 = peg$literalExpectation('STATEMENT', true); - var peg$e60 = peg$literalExpectation('CHARACTER', true); - var peg$e61 = peg$literalExpectation('SET', true); - var peg$e62 = peg$literalExpectation('CHARSET', true); - var peg$e63 = peg$literalExpectation('COLLATE', true); - var peg$e64 = peg$literalExpectation('AVG_ROW_LENGTH', true); - var peg$e65 = peg$literalExpectation('KEY_BLOCK_SIZE', true); - var peg$e66 = peg$literalExpectation('MAX_ROWS', true); - var peg$e67 = peg$literalExpectation('MIN_ROWS', true); - var peg$e68 = peg$literalExpectation('STATS_SAMPLE_PAGES', true); - var peg$e69 = peg$literalExpectation('CONNECTION', true); - var peg$e70 = peg$literalExpectation('COMPRESSION', true); - var peg$e71 = peg$literalExpectation("'", false); - var peg$e72 = peg$literalExpectation('ZLIB', true); - var peg$e73 = peg$literalExpectation('LZ4', true); - var peg$e74 = peg$literalExpectation('ENGINE', true); - var peg$e75 = peg$literalExpectation('IN', true); - var peg$e76 = peg$literalExpectation('ACCESS SHARE', true); - var peg$e77 = peg$literalExpectation('ROW SHARE', true); - var peg$e78 = peg$literalExpectation('ROW EXCLUSIVE', true); - var peg$e79 = peg$literalExpectation('SHARE UPDATE EXCLUSIVE', true); - var peg$e80 = peg$literalExpectation('SHARE ROW EXCLUSIVE', true); - var peg$e81 = peg$literalExpectation('ACCESS EXCLUSIVE', true); - var peg$e82 = peg$literalExpectation('SHARE', true); - var peg$e83 = peg$literalExpectation('MODE', true); - var peg$e84 = peg$literalExpectation('NOWAIT', true); - var peg$e85 = peg$literalExpectation('TABLES', true); - var peg$e86 = peg$literalExpectation('PREPARE', true); - var peg$e87 = peg$literalExpectation(';', false); - var peg$e88 = peg$literalExpectation('(', false); - var peg$e89 = peg$literalExpectation(')', false); - var peg$e90 = peg$literalExpectation('"', false); - var peg$e91 = peg$literalExpectation('OUTFILE', true); - var peg$e92 = peg$literalExpectation('DUMPFILE', true); - var peg$e93 = peg$literalExpectation('BTREE', true); - var peg$e94 = peg$literalExpectation('HASH', true); - var peg$e95 = peg$literalExpectation('GIST', true); - var peg$e96 = peg$literalExpectation('GIN', true); - var peg$e97 = peg$literalExpectation('WITH', true); - var peg$e98 = peg$literalExpectation('PARSER', true); - var peg$e99 = peg$literalExpectation('VISIBLE', true); - var peg$e100 = peg$literalExpectation('INVISIBLE', true); - var peg$e101 = peg$literalExpectation('LATERAL', true); - var peg$e102 = peg$literalExpectation('TABLESAMPLE', true); - var peg$e103 = peg$literalExpectation('REPEATABLE', true); - var peg$e104 = peg$literalExpectation('CROSS', true); - var peg$e105 = peg$literalExpectation('FOLLOWING', true); - var peg$e106 = peg$literalExpectation('PRECEDING', true); - var peg$e107 = peg$literalExpectation('CURRENT', true); - var peg$e108 = peg$literalExpectation('UNBOUNDED', true); - var peg$e109 = peg$literalExpectation('=', false); - var peg$e110 = peg$literalExpectation('CONFLICT', true); - var peg$e111 = peg$literalExpectation('!', false); - var peg$e112 = peg$literalExpectation('>=', false); - var peg$e113 = peg$literalExpectation('>', false); - var peg$e114 = peg$literalExpectation('<=', false); - var peg$e115 = peg$literalExpectation('<>', false); - var peg$e116 = peg$literalExpectation('<', false); - var peg$e117 = peg$literalExpectation('!=', false); - var peg$e118 = peg$literalExpectation('SIMILAR', true); - var peg$e119 = peg$literalExpectation('ESCAPE', true); - var peg$e120 = peg$literalExpectation('@>', false); - var peg$e121 = peg$literalExpectation('<@', false); - var peg$e122 = peg$literalExpectation('?', false); - var peg$e123 = peg$literalExpectation('?|', false); - var peg$e124 = peg$literalExpectation('?&', false); - var peg$e125 = peg$literalExpectation('#-', false); - var peg$e126 = peg$literalExpectation('+', false); - var peg$e127 = peg$literalExpectation('-', false); - var peg$e128 = peg$literalExpectation('*', false); - var peg$e129 = peg$literalExpectation('/', false); - var peg$e130 = peg$literalExpectation('%', false); - var peg$e131 = peg$literalExpectation('||', false); - var peg$e132 = peg$literalExpectation('$', false); - var peg$e133 = peg$literalExpectation('E', true); - var peg$e134 = peg$classExpectation(['"'], true, false); - var peg$e135 = peg$classExpectation(["'"], true, false); - var peg$e136 = peg$literalExpectation('`', false); - var peg$e137 = peg$classExpectation(['`'], true, false); - var peg$e138 = peg$classExpectation([['A', 'Z'], ['a', 'z'], '_'], false, false); - var peg$e139 = peg$classExpectation([['A', 'Z'], ['a', 'z'], ['0', '9'], '_', '-'], false, false); - var peg$e140 = peg$classExpectation([['A', 'Z'], ['a', 'z'], ['0', '9'], '_'], false, false); - var peg$e141 = peg$literalExpectation(':', false); - var peg$e142 = peg$literalExpectation('OVER', true); - var peg$e143 = peg$literalExpectation('FILTER', true); - var peg$e144 = peg$literalExpectation('FIRST_VALUE', true); - var peg$e145 = peg$literalExpectation('LAST_VALUE', true); - var peg$e146 = peg$literalExpectation('ROW_NUMBER', true); - var peg$e147 = peg$literalExpectation('DENSE_RANK', true); - var peg$e148 = peg$literalExpectation('RANK', true); - var peg$e149 = peg$literalExpectation('LAG', true); - var peg$e150 = peg$literalExpectation('LEAD', true); - var peg$e151 = peg$literalExpectation('NTH_VALUE', true); - var peg$e152 = peg$literalExpectation('IGNORE', true); - var peg$e153 = peg$literalExpectation('RESPECT', true); - var peg$e154 = peg$literalExpectation('percentile_cont', true); - var peg$e155 = peg$literalExpectation('percentile_disc', true); - var peg$e156 = peg$literalExpectation('within', true); - var peg$e157 = peg$literalExpectation('mode', true); - var peg$e158 = peg$literalExpectation('SEPARATOR', true); - var peg$e159 = peg$literalExpectation('BOTH', true); - var peg$e160 = peg$literalExpectation('LEADING', true); - var peg$e161 = peg$literalExpectation('TRAILING', true); - var peg$e162 = peg$literalExpectation('trim', true); - var peg$e163 = peg$literalExpectation('now', true); - var peg$e164 = peg$literalExpectation('at', true); - var peg$e165 = peg$literalExpectation('zone', true); - var peg$e166 = peg$literalExpectation('CENTURY', true); - var peg$e167 = peg$literalExpectation('DAY', true); - var peg$e168 = peg$literalExpectation('DATE', true); - var peg$e169 = peg$literalExpectation('DECADE', true); - var peg$e170 = peg$literalExpectation('DOW', true); - var peg$e171 = peg$literalExpectation('DOY', true); - var peg$e172 = peg$literalExpectation('EPOCH', true); - var peg$e173 = peg$literalExpectation('HOUR', true); - var peg$e174 = peg$literalExpectation('ISODOW', true); - var peg$e175 = peg$literalExpectation('ISOYEAR', true); - var peg$e176 = peg$literalExpectation('MICROSECONDS', true); - var peg$e177 = peg$literalExpectation('MILLENNIUM', true); - var peg$e178 = peg$literalExpectation('MILLISECONDS', true); - var peg$e179 = peg$literalExpectation('MINUTE', true); - var peg$e180 = peg$literalExpectation('MONTH', true); - var peg$e181 = peg$literalExpectation('QUARTER', true); - var peg$e182 = peg$literalExpectation('SECOND', true); - var peg$e183 = peg$literalExpectation('TIMEZONE', true); - var peg$e184 = peg$literalExpectation('TIMEZONE_HOUR', true); - var peg$e185 = peg$literalExpectation('TIMEZONE_MINUTE', true); - var peg$e186 = peg$literalExpectation('WEEK', true); - var peg$e187 = peg$literalExpectation('YEAR', true); - var peg$e188 = peg$literalExpectation('NTILE', true); - var peg$e189 = peg$classExpectation(['\n'], false, false); - var peg$e190 = peg$classExpectation(['"', '\\', ['\0', '\x1F'], '\x7F'], true, false); - var peg$e191 = peg$classExpectation(["'", '\\'], true, false); - var peg$e192 = peg$literalExpectation("\\'", false); - var peg$e193 = peg$literalExpectation('\\"', false); - var peg$e194 = peg$literalExpectation('\\\\', false); - var peg$e195 = peg$literalExpectation('\\/', false); - var peg$e196 = peg$literalExpectation('\\b', false); - var peg$e197 = peg$literalExpectation('\\f', false); - var peg$e198 = peg$literalExpectation('\\n', false); - var peg$e199 = peg$literalExpectation('\\r', false); - var peg$e200 = peg$literalExpectation('\\t', false); - var peg$e201 = peg$literalExpectation('\\u', false); - var peg$e202 = peg$literalExpectation('\\', false); - var peg$e203 = peg$literalExpectation("''", false); - var peg$e204 = peg$classExpectation(['\n', '\r'], false, false); - var peg$e205 = peg$literalExpectation('.', false); - var peg$e206 = peg$classExpectation([['0', '9']], false, false); - var peg$e207 = peg$classExpectation( + var peg$e4 = peg$literalExpectation('CASCADED', true); + var peg$e5 = peg$literalExpectation('LOCAL', true); + var peg$e6 = peg$literalExpectation('CHECK', true); + var peg$e7 = peg$literalExpectation('OPTION', false); + var peg$e8 = peg$literalExpectation('check_option', true); + var peg$e9 = peg$literalExpectation('security_barrier', true); + var peg$e10 = peg$literalExpectation('security_invoker', true); + var peg$e11 = peg$literalExpectation('SFUNC', true); + var peg$e12 = peg$literalExpectation('STYPE', true); + var peg$e13 = peg$literalExpectation('AGGREGATE', true); + var peg$e14 = peg$literalExpectation('RETURNS', true); + var peg$e15 = peg$literalExpectation('SETOF', true); + var peg$e16 = peg$literalExpectation('CONSTANT', true); + var peg$e17 = peg$literalExpectation(':=', false); + var peg$e18 = peg$literalExpectation('BEGIN', true); + var peg$e19 = peg$literalExpectation('DECLARE', true); + var peg$e20 = peg$literalExpectation('LANGUAGE', false); + var peg$e21 = peg$literalExpectation('TRANSORM', true); + var peg$e22 = peg$literalExpectation('FOR', false); + var peg$e23 = peg$literalExpectation('TYPE', false); + var peg$e24 = peg$literalExpectation('WINDOW', true); + var peg$e25 = peg$literalExpectation('IMMUTABLE', true); + var peg$e26 = peg$literalExpectation('STABLE', true); + var peg$e27 = peg$literalExpectation('VOLATILE', true); + var peg$e28 = peg$literalExpectation('STRICT', true); + var peg$e29 = peg$literalExpectation('NOT', true); + var peg$e30 = peg$literalExpectation('LEAKPROOF', true); + var peg$e31 = peg$literalExpectation('CALLED', true); + var peg$e32 = peg$literalExpectation('NULL', true); + var peg$e33 = peg$literalExpectation('ON', true); + var peg$e34 = peg$literalExpectation('INPUT', true); + var peg$e35 = peg$literalExpectation('EXTERNAL', true); + var peg$e36 = peg$literalExpectation('SECURITY', true); + var peg$e37 = peg$literalExpectation('INVOKER', true); + var peg$e38 = peg$literalExpectation('DEFINER', true); + var peg$e39 = peg$literalExpectation('PARALLEL', true); + var peg$e40 = peg$literalExpectation('UNSAFE', true); + var peg$e41 = peg$literalExpectation('RESTRICTED', true); + var peg$e42 = peg$literalExpectation('SAFE', true); + var peg$e43 = peg$classExpectation([' ', 's', '\t', '\n', '\r'], true, false); + var peg$e44 = peg$classExpectation([' ', 's', '\t', '\n', '\r', ';'], true, false); + var peg$e45 = peg$literalExpectation('COST', true); + var peg$e46 = peg$literalExpectation('ROWS', true); + var peg$e47 = peg$literalExpectation('SUPPORT', true); + var peg$e48 = peg$literalExpectation('TO', true); + var peg$e49 = peg$literalExpectation('=', false); + var peg$e50 = peg$literalExpectation('CURRENT', true); + var peg$e51 = peg$literalExpectation('FUNCTION', true); + var peg$e52 = peg$literalExpectation('TYPE', true); + var peg$e53 = peg$literalExpectation('DOMAIN', true); + var peg$e54 = peg$literalExpectation('INCREMENT', true); + var peg$e55 = peg$literalExpectation('MINVALUE', true); + var peg$e56 = peg$literalExpectation('NO', true); + var peg$e57 = peg$literalExpectation('MAXVALUE', true); + var peg$e58 = peg$literalExpectation('START', true); + var peg$e59 = peg$literalExpectation('CACHE', true); + var peg$e60 = peg$literalExpectation('CYCLE', true); + var peg$e61 = peg$literalExpectation('OWNED', true); + var peg$e62 = peg$literalExpectation('NONE', true); + var peg$e63 = peg$literalExpectation('NULLS', true); + var peg$e64 = peg$literalExpectation('FIRST', true); + var peg$e65 = peg$literalExpectation('LAST', true); + var peg$e66 = peg$literalExpectation('AUTO_INCREMENT', true); + var peg$e67 = peg$literalExpectation('UNIQUE', true); + var peg$e68 = peg$literalExpectation('KEY', true); + var peg$e69 = peg$literalExpectation('PRIMARY', true); + var peg$e70 = peg$literalExpectation('COLUMN_FORMAT', true); + var peg$e71 = peg$literalExpectation('FIXED', true); + var peg$e72 = peg$literalExpectation('DYNAMIC', true); + var peg$e73 = peg$literalExpectation('DEFAULT', true); + var peg$e74 = peg$literalExpectation('STORAGE', true); + var peg$e75 = peg$literalExpectation('DISK', true); + var peg$e76 = peg$literalExpectation('MEMORY', true); + var peg$e77 = peg$literalExpectation('CASCADE', true); + var peg$e78 = peg$literalExpectation('RESTRICT', true); + var peg$e79 = peg$literalExpectation('OUT', true); + var peg$e80 = peg$literalExpectation('VARIADIC', true); + var peg$e81 = peg$literalExpectation('INOUT', true); + var peg$e82 = peg$literalExpectation('OWNER', true); + var peg$e83 = peg$literalExpectation('CURRENT_ROLE', true); + var peg$e84 = peg$literalExpectation('CURRENT_USER', true); + var peg$e85 = peg$literalExpectation('SESSION_USER', true); + var peg$e86 = peg$literalExpectation('ALGORITHM', true); + var peg$e87 = peg$literalExpectation('INSTANT', true); + var peg$e88 = peg$literalExpectation('INPLACE', true); + var peg$e89 = peg$literalExpectation('COPY', true); + var peg$e90 = peg$literalExpectation('LOCK', true); + var peg$e91 = peg$literalExpectation('SHARED', true); + var peg$e92 = peg$literalExpectation('EXCLUSIVE', true); + var peg$e93 = peg$literalExpectation('PRIMARY KEY', true); + var peg$e94 = peg$literalExpectation('FOREIGN KEY', true); + var peg$e95 = peg$literalExpectation('MATCH FULL', true); + var peg$e96 = peg$literalExpectation('MATCH PARTIAL', true); + var peg$e97 = peg$literalExpectation('MATCH SIMPLE', true); + var peg$e98 = peg$literalExpectation('SET NULL', true); + var peg$e99 = peg$literalExpectation('NO ACTION', true); + var peg$e100 = peg$literalExpectation('SET DEFAULT', true); + var peg$e101 = peg$literalExpectation('TRIGGER', true); + var peg$e102 = peg$literalExpectation('BEFORE', true); + var peg$e103 = peg$literalExpectation('AFTER', true); + var peg$e104 = peg$literalExpectation('INSTEAD OF', true); + var peg$e105 = peg$literalExpectation('EXECUTE', true); + var peg$e106 = peg$literalExpectation('PROCEDURE', true); + var peg$e107 = peg$literalExpectation('OF', true); + var peg$e108 = peg$literalExpectation('DEFERRABLE', true); + var peg$e109 = peg$literalExpectation('INITIALLY IMMEDIATE', true); + var peg$e110 = peg$literalExpectation('INITIALLY DEFERRED', true); + var peg$e111 = peg$literalExpectation('FOR', true); + var peg$e112 = peg$literalExpectation('EACH', true); + var peg$e113 = peg$literalExpectation('ROW', true); + var peg$e114 = peg$literalExpectation('STATEMENT', true); + var peg$e115 = peg$literalExpectation('CHARACTER', true); + var peg$e116 = peg$literalExpectation('SET', true); + var peg$e117 = peg$literalExpectation('CHARSET', true); + var peg$e118 = peg$literalExpectation('COLLATE', true); + var peg$e119 = peg$literalExpectation('AVG_ROW_LENGTH', true); + var peg$e120 = peg$literalExpectation('KEY_BLOCK_SIZE', true); + var peg$e121 = peg$literalExpectation('MAX_ROWS', true); + var peg$e122 = peg$literalExpectation('MIN_ROWS', true); + var peg$e123 = peg$literalExpectation('STATS_SAMPLE_PAGES', true); + var peg$e124 = peg$literalExpectation('CONNECTION', true); + var peg$e125 = peg$literalExpectation('COMPRESSION', true); + var peg$e126 = peg$literalExpectation("'", false); + var peg$e127 = peg$literalExpectation('ZLIB', true); + var peg$e128 = peg$literalExpectation('LZ4', true); + var peg$e129 = peg$literalExpectation('ENGINE', true); + var peg$e130 = peg$literalExpectation('IN', true); + var peg$e131 = peg$literalExpectation('ACCESS SHARE', true); + var peg$e132 = peg$literalExpectation('ROW SHARE', true); + var peg$e133 = peg$literalExpectation('ROW EXCLUSIVE', true); + var peg$e134 = peg$literalExpectation('SHARE UPDATE EXCLUSIVE', true); + var peg$e135 = peg$literalExpectation('SHARE ROW EXCLUSIVE', true); + var peg$e136 = peg$literalExpectation('ACCESS EXCLUSIVE', true); + var peg$e137 = peg$literalExpectation('SHARE', true); + var peg$e138 = peg$literalExpectation('MODE', true); + var peg$e139 = peg$literalExpectation('NOWAIT', true); + var peg$e140 = peg$literalExpectation('TABLES', true); + var peg$e141 = peg$literalExpectation('PREPARE', true); + var peg$e142 = peg$literalExpectation('USAGE', true); + var peg$e143 = peg$literalExpectation('CONNECT', true); + var peg$e144 = peg$literalExpectation('PRIVILEGES', true); + var peg$e145 = peg$literalExpectation('SEQUENCE', true); + var peg$e146 = peg$literalExpectation('DATABASE', true); + var peg$e147 = peg$literalExpectation('DOMAIN', false); + var peg$e148 = peg$literalExpectation('FUNCTION', false); + var peg$e149 = peg$literalExpectation('ROUTINE', true); + var peg$e150 = peg$literalExpectation('LANGUAGE', true); + var peg$e151 = peg$literalExpectation('LARGE', true); + var peg$e152 = peg$literalExpectation('SCHEMA', false); + var peg$e153 = peg$literalExpectation('FUNCTIONS', true); + var peg$e154 = peg$literalExpectation('PROCEDURES', true); + var peg$e155 = peg$literalExpectation('ROUTINES', true); + var peg$e156 = peg$literalExpectation('PUBLIC', true); + var peg$e157 = peg$literalExpectation('GRANT', true); + var peg$e158 = peg$literalExpectation('OPTION', true); + var peg$e159 = peg$literalExpectation('ADMIN', true); + var peg$e160 = peg$literalExpectation('REVOKE', true); + var peg$e161 = peg$literalExpectation('ELSEIF', true); + var peg$e162 = peg$literalExpectation('THEN', true); + var peg$e163 = peg$literalExpectation('END', true); + var peg$e164 = peg$literalExpectation('DEBUG', true); + var peg$e165 = peg$literalExpectation('LOG', true); + var peg$e166 = peg$literalExpectation('INFO', true); + var peg$e167 = peg$literalExpectation('NOTICE', true); + var peg$e168 = peg$literalExpectation('WARNING', true); + var peg$e169 = peg$literalExpectation('EXCEPTION', true); + var peg$e170 = peg$literalExpectation('MESSAGE', true); + var peg$e171 = peg$literalExpectation('DETAIL', true); + var peg$e172 = peg$literalExpectation('HINT', true); + var peg$e173 = peg$literalExpectation('ERRCODE', true); + var peg$e174 = peg$literalExpectation('COLUMN', true); + var peg$e175 = peg$literalExpectation('CONSTRAINT', true); + var peg$e176 = peg$literalExpectation('DATATYPE', true); + var peg$e177 = peg$literalExpectation('TABLE', true); + var peg$e178 = peg$literalExpectation('SQLSTATE', true); + var peg$e179 = peg$literalExpectation('RAISE', true); + var peg$e180 = peg$literalExpectation('LOOP', true); + var peg$e181 = peg$literalExpectation(';', false); + var peg$e182 = peg$literalExpectation('(', false); + var peg$e183 = peg$literalExpectation(')', false); + var peg$e184 = peg$literalExpectation('"', false); + var peg$e185 = peg$literalExpectation('OUTFILE', true); + var peg$e186 = peg$literalExpectation('DUMPFILE', true); + var peg$e187 = peg$literalExpectation('BTREE', true); + var peg$e188 = peg$literalExpectation('HASH', true); + var peg$e189 = peg$literalExpectation('GIST', true); + var peg$e190 = peg$literalExpectation('GIN', true); + var peg$e191 = peg$literalExpectation('WITH', true); + var peg$e192 = peg$literalExpectation('PARSER', true); + var peg$e193 = peg$literalExpectation('VISIBLE', true); + var peg$e194 = peg$literalExpectation('INVISIBLE', true); + var peg$e195 = peg$literalExpectation('LATERAL', true); + var peg$e196 = peg$literalExpectation('TABLESAMPLE', true); + var peg$e197 = peg$literalExpectation('REPEATABLE', true); + var peg$e198 = peg$literalExpectation('CROSS', true); + var peg$e199 = peg$literalExpectation('FOLLOWING', true); + var peg$e200 = peg$literalExpectation('PRECEDING', true); + var peg$e201 = peg$literalExpectation('UNBOUNDED', true); + var peg$e202 = peg$literalExpectation('DO', true); + var peg$e203 = peg$literalExpectation('NOTHING', true); + var peg$e204 = peg$literalExpectation('CONFLICT', true); + var peg$e205 = peg$literalExpectation('!', false); + var peg$e206 = peg$literalExpectation('>=', false); + var peg$e207 = peg$literalExpectation('>', false); + var peg$e208 = peg$literalExpectation('<=', false); + var peg$e209 = peg$literalExpectation('<>', false); + var peg$e210 = peg$literalExpectation('<', false); + var peg$e211 = peg$literalExpectation('!=', false); + var peg$e212 = peg$literalExpectation('SIMILAR', true); + var peg$e213 = peg$literalExpectation('!~*', false); + var peg$e214 = peg$literalExpectation('~*', false); + var peg$e215 = peg$literalExpectation('~', false); + var peg$e216 = peg$literalExpectation('!~', false); + var peg$e217 = peg$literalExpectation('ESCAPE', true); + var peg$e218 = peg$literalExpectation('@>', false); + var peg$e219 = peg$literalExpectation('<@', false); + var peg$e220 = peg$literalExpectation('?', false); + var peg$e221 = peg$literalExpectation('?|', false); + var peg$e222 = peg$literalExpectation('?&', false); + var peg$e223 = peg$literalExpectation('#-', false); + var peg$e224 = peg$literalExpectation('+', false); + var peg$e225 = peg$literalExpectation('-', false); + var peg$e226 = peg$literalExpectation('*', false); + var peg$e227 = peg$literalExpectation('/', false); + var peg$e228 = peg$literalExpectation('%', false); + var peg$e229 = peg$literalExpectation('||', false); + var peg$e230 = peg$literalExpectation('$', false); + var peg$e231 = peg$literalExpectation('E', true); + var peg$e232 = peg$classExpectation(['"'], true, false); + var peg$e233 = peg$classExpectation(["'"], true, false); + var peg$e234 = peg$literalExpectation('`', false); + var peg$e235 = peg$classExpectation(['`'], true, false); + var peg$e236 = peg$classExpectation([['A', 'Z'], ['a', 'z'], '_', ['\u4E00', '\u9FA5']], false, false); + var peg$e237 = peg$classExpectation( + [['A', 'Z'], ['a', 'z'], ['0', '9'], '_', '-', '$', ['\u4E00', '\u9FA5'], ['\xC0', '\u017F']], + false, + false, + ); + var peg$e238 = peg$classExpectation([['A', 'Z'], ['a', 'z'], ['0', '9'], '_', ['\u4E00', '\u9FA5']], false, false); + var peg$e239 = peg$literalExpectation(':', false); + var peg$e240 = peg$literalExpectation('OVER', true); + var peg$e241 = peg$literalExpectation('FILTER', true); + var peg$e242 = peg$literalExpectation('FIRST_VALUE', true); + var peg$e243 = peg$literalExpectation('LAST_VALUE', true); + var peg$e244 = peg$literalExpectation('ROW_NUMBER', true); + var peg$e245 = peg$literalExpectation('DENSE_RANK', true); + var peg$e246 = peg$literalExpectation('RANK', true); + var peg$e247 = peg$literalExpectation('LAG', true); + var peg$e248 = peg$literalExpectation('LEAD', true); + var peg$e249 = peg$literalExpectation('NTH_VALUE', true); + var peg$e250 = peg$literalExpectation('IGNORE', true); + var peg$e251 = peg$literalExpectation('RESPECT', true); + var peg$e252 = peg$literalExpectation('percentile_cont', true); + var peg$e253 = peg$literalExpectation('percentile_disc', true); + var peg$e254 = peg$literalExpectation('within', true); + var peg$e255 = peg$literalExpectation('mode', true); + var peg$e256 = peg$literalExpectation('SEPARATOR', true); + var peg$e257 = peg$literalExpectation('BOTH', true); + var peg$e258 = peg$literalExpectation('LEADING', true); + var peg$e259 = peg$literalExpectation('TRAILING', true); + var peg$e260 = peg$literalExpectation('trim', true); + var peg$e261 = peg$literalExpectation('now', true); + var peg$e262 = peg$literalExpectation('at', true); + var peg$e263 = peg$literalExpectation('zone', true); + var peg$e264 = peg$literalExpectation('CENTURY', true); + var peg$e265 = peg$literalExpectation('DAY', true); + var peg$e266 = peg$literalExpectation('DATE', true); + var peg$e267 = peg$literalExpectation('DECADE', true); + var peg$e268 = peg$literalExpectation('DOW', true); + var peg$e269 = peg$literalExpectation('DOY', true); + var peg$e270 = peg$literalExpectation('EPOCH', true); + var peg$e271 = peg$literalExpectation('HOUR', true); + var peg$e272 = peg$literalExpectation('ISODOW', true); + var peg$e273 = peg$literalExpectation('ISOYEAR', true); + var peg$e274 = peg$literalExpectation('MICROSECONDS', true); + var peg$e275 = peg$literalExpectation('MILLENNIUM', true); + var peg$e276 = peg$literalExpectation('MILLISECONDS', true); + var peg$e277 = peg$literalExpectation('MINUTE', true); + var peg$e278 = peg$literalExpectation('MONTH', true); + var peg$e279 = peg$literalExpectation('QUARTER', true); + var peg$e280 = peg$literalExpectation('SECOND', true); + var peg$e281 = peg$literalExpectation('TIMEZONE', true); + var peg$e282 = peg$literalExpectation('TIMEZONE_HOUR', true); + var peg$e283 = peg$literalExpectation('TIMEZONE_MINUTE', true); + var peg$e284 = peg$literalExpectation('WEEK', true); + var peg$e285 = peg$literalExpectation('YEAR', true); + var peg$e286 = peg$literalExpectation('NTILE', true); + var peg$e287 = peg$classExpectation(['\n'], false, false); + var peg$e288 = peg$classExpectation(['"', '\\', ['\0', '\x1F'], '\x7F'], true, false); + var peg$e289 = peg$classExpectation(["'", '\\'], true, false); + var peg$e290 = peg$literalExpectation("\\'", false); + var peg$e291 = peg$literalExpectation('\\"', false); + var peg$e292 = peg$literalExpectation('\\\\', false); + var peg$e293 = peg$literalExpectation('\\/', false); + var peg$e294 = peg$literalExpectation('\\b', false); + var peg$e295 = peg$literalExpectation('\\f', false); + var peg$e296 = peg$literalExpectation('\\n', false); + var peg$e297 = peg$literalExpectation('\\r', false); + var peg$e298 = peg$literalExpectation('\\t', false); + var peg$e299 = peg$literalExpectation('\\u', false); + var peg$e300 = peg$literalExpectation('\\', false); + var peg$e301 = peg$literalExpectation("''", false); + var peg$e302 = peg$classExpectation(['\n', '\r'], false, false); + var peg$e303 = peg$literalExpectation('.', false); + var peg$e304 = peg$classExpectation([['0', '9']], false, false); + var peg$e305 = peg$classExpectation( [ ['0', '9'], ['a', 'f'], @@ -791,193 +978,181 @@ function peg$parse(input, options) { false, false, ); - var peg$e208 = peg$classExpectation(['e', 'E'], false, false); - var peg$e209 = peg$classExpectation(['+', '-'], false, false); - var peg$e210 = peg$literalExpectation('NULL', true); - var peg$e211 = peg$literalExpectation('NOT NULL', true); - var peg$e212 = peg$literalExpectation('TRUE', true); - var peg$e213 = peg$literalExpectation('TO', true); - var peg$e214 = peg$literalExpectation('FALSE', true); - var peg$e215 = peg$literalExpectation('SHOW', true); - var peg$e216 = peg$literalExpectation('DROP', true); - var peg$e217 = peg$literalExpectation('USE', true); - var peg$e218 = peg$literalExpectation('ALTER', true); - var peg$e219 = peg$literalExpectation('SELECT', true); - var peg$e220 = peg$literalExpectation('UPDATE', true); - var peg$e221 = peg$literalExpectation('CREATE', true); - var peg$e222 = peg$literalExpectation('TEMPORARY', true); - var peg$e223 = peg$literalExpectation('TEMP', true); - var peg$e224 = peg$literalExpectation('DELETE', true); - var peg$e225 = peg$literalExpectation('INSERT', true); - var peg$e226 = peg$literalExpectation('RECURSIVE', false); - var peg$e227 = peg$literalExpectation('REPLACE', true); - var peg$e228 = peg$literalExpectation('RETURNING', true); - var peg$e229 = peg$literalExpectation('RENAME', true); - var peg$e230 = peg$literalExpectation('EXPLAIN', true); - var peg$e231 = peg$literalExpectation('PARTITION', true); - var peg$e232 = peg$literalExpectation('INTO', true); - var peg$e233 = peg$literalExpectation('FROM', true); - var peg$e234 = peg$literalExpectation('AS', true); - var peg$e235 = peg$literalExpectation('TABLE', true); - var peg$e236 = peg$literalExpectation('DATABASE', true); - var peg$e237 = peg$literalExpectation('SCHEME', true); - var peg$e238 = peg$literalExpectation('SEQUENCE', true); - var peg$e239 = peg$literalExpectation('TABLESPACE', true); - var peg$e240 = peg$literalExpectation('DEALLOCATE', true); - var peg$e241 = peg$literalExpectation('LEFT', true); - var peg$e242 = peg$literalExpectation('RIGHT', true); - var peg$e243 = peg$literalExpectation('FULL', true); - var peg$e244 = peg$literalExpectation('INNER', true); - var peg$e245 = peg$literalExpectation('JOIN', true); - var peg$e246 = peg$literalExpectation('OUTER', true); - var peg$e247 = peg$literalExpectation('UNION', true); - var peg$e248 = peg$literalExpectation('VALUES', true); - var peg$e249 = peg$literalExpectation('USING', true); - var peg$e250 = peg$literalExpectation('WHERE', true); - var peg$e251 = peg$literalExpectation('GROUP', true); - var peg$e252 = peg$literalExpectation('BY', true); - var peg$e253 = peg$literalExpectation('ORDER', true); - var peg$e254 = peg$literalExpectation('HAVING', true); - var peg$e255 = peg$literalExpectation('WINDOW', true); - var peg$e256 = peg$literalExpectation('LIMIT', true); - var peg$e257 = peg$literalExpectation('OFFSET', true); - var peg$e258 = peg$literalExpectation('ASC', true); - var peg$e259 = peg$literalExpectation('DESC', true); - var peg$e260 = peg$literalExpectation('ALL', true); - var peg$e261 = peg$literalExpectation('DISTINCT', true); - var peg$e262 = peg$literalExpectation('BETWEEN', true); - var peg$e263 = peg$literalExpectation('IS', true); - var peg$e264 = peg$literalExpectation('LIKE', true); - var peg$e265 = peg$literalExpectation('ILIKE', true); - var peg$e266 = peg$literalExpectation('EXISTS', true); - var peg$e267 = peg$literalExpectation('AND', true); - var peg$e268 = peg$literalExpectation('OR', true); - var peg$e269 = peg$literalExpectation('ARRAY', true); - var peg$e270 = peg$literalExpectation('ARRAY_AGG', true); - var peg$e271 = peg$literalExpectation('COUNT', true); - var peg$e272 = peg$literalExpectation('GROUP_CONCAT', true); - var peg$e273 = peg$literalExpectation('MAX', true); - var peg$e274 = peg$literalExpectation('MIN', true); - var peg$e275 = peg$literalExpectation('SUM', true); - var peg$e276 = peg$literalExpectation('AVG', true); - var peg$e277 = peg$literalExpectation('EXTRACT', true); - var peg$e278 = peg$literalExpectation('CALL', true); - var peg$e279 = peg$literalExpectation('CASE', true); - var peg$e280 = peg$literalExpectation('WHEN', true); - var peg$e281 = peg$literalExpectation('THEN', true); - var peg$e282 = peg$literalExpectation('ELSE', true); - var peg$e283 = peg$literalExpectation('END', true); - var peg$e284 = peg$literalExpectation('CAST', true); - var peg$e285 = peg$literalExpectation('BOOL', true); - var peg$e286 = peg$literalExpectation('BOOLEAN', true); - var peg$e287 = peg$literalExpectation('CHAR', true); - var peg$e288 = peg$literalExpectation('VARCHAR', true); - var peg$e289 = peg$literalExpectation('NUMERIC', true); - var peg$e290 = peg$literalExpectation('DECIMAL', true); - var peg$e291 = peg$literalExpectation('SIGNED', true); - var peg$e292 = peg$literalExpectation('UNSIGNED', true); - var peg$e293 = peg$literalExpectation('INT', true); - var peg$e294 = peg$literalExpectation('ZEROFILL', true); - var peg$e295 = peg$literalExpectation('INTEGER', true); - var peg$e296 = peg$literalExpectation('JSON', true); - var peg$e297 = peg$literalExpectation('JSONB', true); - var peg$e298 = peg$literalExpectation('GEOMETRY', true); - var peg$e299 = peg$literalExpectation('SMALLINT', true); - var peg$e300 = peg$literalExpectation('SERIAL', true); - var peg$e301 = peg$literalExpectation('TINYINT', true); - var peg$e302 = peg$literalExpectation('TINYTEXT', true); - var peg$e303 = peg$literalExpectation('TEXT', true); - var peg$e304 = peg$literalExpectation('MEDIUMTEXT', true); - var peg$e305 = peg$literalExpectation('LONGTEXT', true); - var peg$e306 = peg$literalExpectation('BIGINT', true); - var peg$e307 = peg$literalExpectation('ENUM', true); - var peg$e308 = peg$literalExpectation('FLOAT', true); - var peg$e309 = peg$literalExpectation('DOUBLE', true); - var peg$e310 = peg$literalExpectation('BIGSERIAL', true); - var peg$e311 = peg$literalExpectation('REAL', true); - var peg$e312 = peg$literalExpectation('DATETIME', true); - var peg$e313 = peg$literalExpectation('ROWS', true); - var peg$e314 = peg$literalExpectation('TIME', true); - var peg$e315 = peg$literalExpectation('TIMESTAMP', true); - var peg$e316 = peg$literalExpectation('TRUNCATE', true); - var peg$e317 = peg$literalExpectation('USER', true); - var peg$e318 = peg$literalExpectation('UUID', true); - var peg$e319 = peg$literalExpectation('OID', true); - var peg$e320 = peg$literalExpectation('REGCLASS', true); - var peg$e321 = peg$literalExpectation('REGCOLLATION', true); - var peg$e322 = peg$literalExpectation('REGCONFIG', true); - var peg$e323 = peg$literalExpectation('REGDICTIONARY', true); - var peg$e324 = peg$literalExpectation('REGNAMESPACE', true); - var peg$e325 = peg$literalExpectation('REGOPER', true); - var peg$e326 = peg$literalExpectation('REGOPERATOR', true); - var peg$e327 = peg$literalExpectation('REGPROC', true); - var peg$e328 = peg$literalExpectation('REGPROCEDURE', true); - var peg$e329 = peg$literalExpectation('REGROLE', true); - var peg$e330 = peg$literalExpectation('REGTYPE', true); - var peg$e331 = peg$literalExpectation('CURRENT_DATE', true); - var peg$e332 = peg$literalExpectation('ADDDATE', true); - var peg$e333 = peg$literalExpectation('INTERVAL', true); - var peg$e334 = peg$literalExpectation('CURRENT_TIME', true); - var peg$e335 = peg$literalExpectation('CURRENT_TIMESTAMP', true); - var peg$e336 = peg$literalExpectation('CURRENT_USER', true); - var peg$e337 = peg$literalExpectation('SESSION_USER', true); - var peg$e338 = peg$literalExpectation('SYSTEM_USER', true); - var peg$e339 = peg$literalExpectation('GLOBAL', true); - var peg$e340 = peg$literalExpectation('SESSION', true); - var peg$e341 = peg$literalExpectation('LOCAL', true); - var peg$e342 = peg$literalExpectation('PERSIST', true); - var peg$e343 = peg$literalExpectation('PERSIST_ONLY', true); - var peg$e344 = peg$literalExpectation('@', false); - var peg$e345 = peg$literalExpectation('@@', false); - var peg$e346 = peg$literalExpectation('$$', false); - var peg$e347 = peg$literalExpectation('return', true); - var peg$e348 = peg$literalExpectation(':=', false); - var peg$e349 = peg$literalExpectation('::', false); - var peg$e350 = peg$literalExpectation('DUAL', true); - var peg$e351 = peg$literalExpectation('ADD', true); - var peg$e352 = peg$literalExpectation('COLUMN', true); - var peg$e353 = peg$literalExpectation('INDEX', true); - var peg$e354 = peg$literalExpectation('FULLTEXT', true); - var peg$e355 = peg$literalExpectation('SPATIAL', true); - var peg$e356 = peg$literalExpectation('COMMENT', true); - var peg$e357 = peg$literalExpectation('CONSTRAINT', true); - var peg$e358 = peg$literalExpectation('CONCURRENTLY', true); - var peg$e359 = peg$literalExpectation('REFERENCES', true); - var peg$e360 = peg$literalExpectation('SQL_CALC_FOUND_ROWS', true); - var peg$e361 = peg$literalExpectation('SQL_CACHE', true); - var peg$e362 = peg$literalExpectation('SQL_NO_CACHE', true); - var peg$e363 = peg$literalExpectation('SQL_SMALL_RESULT', true); - var peg$e364 = peg$literalExpectation('SQL_BIG_RESULT', true); - var peg$e365 = peg$literalExpectation('SQL_BUFFER_RESULT', true); - var peg$e366 = peg$literalExpectation(',', false); - var peg$e367 = peg$literalExpectation('[', false); - var peg$e368 = peg$literalExpectation(']', false); - var peg$e369 = peg$literalExpectation('->', false); - var peg$e370 = peg$literalExpectation('->>', false); - var peg$e371 = peg$literalExpectation('#>', false); - var peg$e372 = peg$literalExpectation('#>>', false); - var peg$e373 = peg$literalExpectation('&&', false); - var peg$e374 = peg$literalExpectation('/*', false); - var peg$e375 = peg$literalExpectation('*/', false); - var peg$e376 = peg$literalExpectation('--', false); - var peg$e377 = peg$literalExpectation('#', false); - var peg$e378 = peg$anyExpectation(); - var peg$e379 = peg$classExpectation([' ', '\t', '\n', '\r'], false, false); - var peg$e380 = peg$classExpectation(['$'], true, false); - var peg$e381 = peg$literalExpectation('bytea', true); - var peg$e382 = peg$literalExpectation('WITHOUT', true); - var peg$e383 = peg$literalExpectation('ZONE', true); + var peg$e306 = peg$classExpectation(['e', 'E'], false, false); + var peg$e307 = peg$classExpectation(['+', '-'], false, false); + var peg$e308 = peg$literalExpectation('NOT NULL', true); + var peg$e309 = peg$literalExpectation('TRUE', true); + var peg$e310 = peg$literalExpectation('FALSE', true); + var peg$e311 = peg$literalExpectation('SHOW', true); + var peg$e312 = peg$literalExpectation('DROP', true); + var peg$e313 = peg$literalExpectation('USE', true); + var peg$e314 = peg$literalExpectation('ALTER', true); + var peg$e315 = peg$literalExpectation('SELECT', true); + var peg$e316 = peg$literalExpectation('UPDATE', true); + var peg$e317 = peg$literalExpectation('CREATE', true); + var peg$e318 = peg$literalExpectation('TEMPORARY', true); + var peg$e319 = peg$literalExpectation('TEMP', true); + var peg$e320 = peg$literalExpectation('DELETE', true); + var peg$e321 = peg$literalExpectation('INSERT', true); + var peg$e322 = peg$literalExpectation('RECURSIVE', false); + var peg$e323 = peg$literalExpectation('REPLACE', true); + var peg$e324 = peg$literalExpectation('RETURNING', true); + var peg$e325 = peg$literalExpectation('RENAME', true); + var peg$e326 = peg$literalExpectation('EXPLAIN', true); + var peg$e327 = peg$literalExpectation('PARTITION', true); + var peg$e328 = peg$literalExpectation('INTO', true); + var peg$e329 = peg$literalExpectation('FROM', true); + var peg$e330 = peg$literalExpectation('AS', true); + var peg$e331 = peg$literalExpectation('TABLESPACE', true); + var peg$e332 = peg$literalExpectation('DEALLOCATE', true); + var peg$e333 = peg$literalExpectation('LEFT', true); + var peg$e334 = peg$literalExpectation('RIGHT', true); + var peg$e335 = peg$literalExpectation('FULL', true); + var peg$e336 = peg$literalExpectation('INNER', true); + var peg$e337 = peg$literalExpectation('JOIN', true); + var peg$e338 = peg$literalExpectation('OUTER', true); + var peg$e339 = peg$literalExpectation('UNION', true); + var peg$e340 = peg$literalExpectation('VALUES', true); + var peg$e341 = peg$literalExpectation('USING', true); + var peg$e342 = peg$literalExpectation('WHERE', true); + var peg$e343 = peg$literalExpectation('GROUP', true); + var peg$e344 = peg$literalExpectation('BY', true); + var peg$e345 = peg$literalExpectation('ORDER', true); + var peg$e346 = peg$literalExpectation('HAVING', true); + var peg$e347 = peg$literalExpectation('LIMIT', true); + var peg$e348 = peg$literalExpectation('OFFSET', true); + var peg$e349 = peg$literalExpectation('ASC', true); + var peg$e350 = peg$literalExpectation('DESC', true); + var peg$e351 = peg$literalExpectation('ALL', true); + var peg$e352 = peg$literalExpectation('DISTINCT', true); + var peg$e353 = peg$literalExpectation('BETWEEN', true); + var peg$e354 = peg$literalExpectation('IS', true); + var peg$e355 = peg$literalExpectation('LIKE', true); + var peg$e356 = peg$literalExpectation('ILIKE', true); + var peg$e357 = peg$literalExpectation('EXISTS', true); + var peg$e358 = peg$literalExpectation('AND', true); + var peg$e359 = peg$literalExpectation('OR', true); + var peg$e360 = peg$literalExpectation('ARRAY', true); + var peg$e361 = peg$literalExpectation('ARRAY_AGG', true); + var peg$e362 = peg$literalExpectation('COUNT', true); + var peg$e363 = peg$literalExpectation('GROUP_CONCAT', true); + var peg$e364 = peg$literalExpectation('MAX', true); + var peg$e365 = peg$literalExpectation('MIN', true); + var peg$e366 = peg$literalExpectation('SUM', true); + var peg$e367 = peg$literalExpectation('AVG', true); + var peg$e368 = peg$literalExpectation('EXTRACT', true); + var peg$e369 = peg$literalExpectation('CALL', true); + var peg$e370 = peg$literalExpectation('CASE', true); + var peg$e371 = peg$literalExpectation('WHEN', true); + var peg$e372 = peg$literalExpectation('ELSE', true); + var peg$e373 = peg$literalExpectation('CAST', true); + var peg$e374 = peg$literalExpectation('BOOL', true); + var peg$e375 = peg$literalExpectation('BOOLEAN', true); + var peg$e376 = peg$literalExpectation('CHAR', true); + var peg$e377 = peg$literalExpectation('VARCHAR', true); + var peg$e378 = peg$literalExpectation('NUMERIC', true); + var peg$e379 = peg$literalExpectation('DECIMAL', true); + var peg$e380 = peg$literalExpectation('SIGNED', true); + var peg$e381 = peg$literalExpectation('UNSIGNED', true); + var peg$e382 = peg$literalExpectation('INT', true); + var peg$e383 = peg$literalExpectation('ZEROFILL', true); + var peg$e384 = peg$literalExpectation('INTEGER', true); + var peg$e385 = peg$literalExpectation('JSON', true); + var peg$e386 = peg$literalExpectation('JSONB', true); + var peg$e387 = peg$literalExpectation('GEOMETRY', true); + var peg$e388 = peg$literalExpectation('SMALLINT', true); + var peg$e389 = peg$literalExpectation('SERIAL', true); + var peg$e390 = peg$literalExpectation('TINYINT', true); + var peg$e391 = peg$literalExpectation('TINYTEXT', true); + var peg$e392 = peg$literalExpectation('TEXT', true); + var peg$e393 = peg$literalExpectation('MEDIUMTEXT', true); + var peg$e394 = peg$literalExpectation('LONGTEXT', true); + var peg$e395 = peg$literalExpectation('BIGINT', true); + var peg$e396 = peg$literalExpectation('ENUM', true); + var peg$e397 = peg$literalExpectation('FLOAT', true); + var peg$e398 = peg$literalExpectation('DOUBLE PRECISION', true); + var peg$e399 = peg$literalExpectation('BIGSERIAL', true); + var peg$e400 = peg$literalExpectation('REAL', true); + var peg$e401 = peg$literalExpectation('DATETIME', true); + var peg$e402 = peg$literalExpectation('TIME', true); + var peg$e403 = peg$literalExpectation('TIMESTAMP', true); + var peg$e404 = peg$literalExpectation('TRUNCATE', true); + var peg$e405 = peg$literalExpectation('USER', true); + var peg$e406 = peg$literalExpectation('UUID', true); + var peg$e407 = peg$literalExpectation('OID', true); + var peg$e408 = peg$literalExpectation('REGCLASS', true); + var peg$e409 = peg$literalExpectation('REGCOLLATION', true); + var peg$e410 = peg$literalExpectation('REGCONFIG', true); + var peg$e411 = peg$literalExpectation('REGDICTIONARY', true); + var peg$e412 = peg$literalExpectation('REGNAMESPACE', true); + var peg$e413 = peg$literalExpectation('REGOPER', true); + var peg$e414 = peg$literalExpectation('REGOPERATOR', true); + var peg$e415 = peg$literalExpectation('REGPROC', true); + var peg$e416 = peg$literalExpectation('REGPROCEDURE', true); + var peg$e417 = peg$literalExpectation('REGROLE', true); + var peg$e418 = peg$literalExpectation('REGTYPE', true); + var peg$e419 = peg$literalExpectation('CURRENT_DATE', true); + var peg$e420 = peg$literalExpectation('ADDDATE', true); + var peg$e421 = peg$literalExpectation('INTERVAL', true); + var peg$e422 = peg$literalExpectation('CURRENT_TIME', true); + var peg$e423 = peg$literalExpectation('CURRENT_TIMESTAMP', true); + var peg$e424 = peg$literalExpectation('SYSTEM_USER', true); + var peg$e425 = peg$literalExpectation('GLOBAL', true); + var peg$e426 = peg$literalExpectation('SESSION', true); + var peg$e427 = peg$literalExpectation('PERSIST', true); + var peg$e428 = peg$literalExpectation('PERSIST_ONLY', true); + var peg$e429 = peg$literalExpectation('VIEW', true); + var peg$e430 = peg$literalExpectation('@', false); + var peg$e431 = peg$literalExpectation('@@', false); + var peg$e432 = peg$literalExpectation('$$', false); + var peg$e433 = peg$literalExpectation('return', true); + var peg$e434 = peg$literalExpectation('::', false); + var peg$e435 = peg$literalExpectation('DUAL', true); + var peg$e436 = peg$literalExpectation('ADD', true); + var peg$e437 = peg$literalExpectation('INDEX', true); + var peg$e438 = peg$literalExpectation('FULLTEXT', true); + var peg$e439 = peg$literalExpectation('SPATIAL', true); + var peg$e440 = peg$literalExpectation('COMMENT', true); + var peg$e441 = peg$literalExpectation('CONCURRENTLY', true); + var peg$e442 = peg$literalExpectation('REFERENCES', true); + var peg$e443 = peg$literalExpectation('SQL_CALC_FOUND_ROWS', true); + var peg$e444 = peg$literalExpectation('SQL_CACHE', true); + var peg$e445 = peg$literalExpectation('SQL_NO_CACHE', true); + var peg$e446 = peg$literalExpectation('SQL_SMALL_RESULT', true); + var peg$e447 = peg$literalExpectation('SQL_BIG_RESULT', true); + var peg$e448 = peg$literalExpectation('SQL_BUFFER_RESULT', true); + var peg$e449 = peg$literalExpectation(',', false); + var peg$e450 = peg$literalExpectation('[', false); + var peg$e451 = peg$literalExpectation(']', false); + var peg$e452 = peg$literalExpectation('->', false); + var peg$e453 = peg$literalExpectation('->>', false); + var peg$e454 = peg$literalExpectation('#>', false); + var peg$e455 = peg$literalExpectation('#>>', false); + var peg$e456 = peg$literalExpectation('&&', false); + var peg$e457 = peg$literalExpectation('/*', false); + var peg$e458 = peg$literalExpectation('*/', false); + var peg$e459 = peg$literalExpectation('--', false); + var peg$e460 = peg$literalExpectation('#', false); + var peg$e461 = peg$anyExpectation(); + var peg$e462 = peg$classExpectation([' ', '\t', '\n', '\r'], false, false); + var peg$e463 = peg$classExpectation(['$'], true, false); + var peg$e464 = peg$literalExpectation('bytea', true); + var peg$e465 = peg$literalExpectation('varying', true); + var peg$e466 = peg$literalExpectation('WITHOUT', true); + var peg$e467 = peg$literalExpectation('ZONE', true); + var peg$e468 = peg$literalExpectation('RECORD', true); var peg$f0 = function (n) { - // => multiple_stmt | cmd_stmt | crud_stmt + // => multiple_stmt return n; }; var peg$f1 = function (head, tail) { /* // is in reality: { tableList: any[]; columnList: any[]; ast: T; } export type AstStatement = T; - => AstStatement */ - const cur = [(head && head.ast) || head]; + => AstStatement */ + const headAst = (head && head.ast) || head; + const cur = tail && tail.length && tail[0].length >= 4 ? [headAst] : headAst; for (let i = 0; i < tail.length; i++) { if (!tail[i][3] || tail[i][3].length === 0) continue; cur.push((tail[i][3] && tail[i][3].ast) || tail[i][3]); @@ -989,13 +1164,13 @@ function peg$parse(input, options) { }; }; var peg$f2 = function (a) { - // => 'union' | 'union all' - return a ? 'union all' : 'union'; + // => 'union' | 'union all' | 'union distinct' + return a ? `union ${a.toLowerCase()}` : 'union'; }; var peg$f3 = function (head, tail, ob, l) { /* export interface union_stmt_node extends select_stmt_node { _next: union_stmt_node; - set_op: 'union' | 'union all'; + set_op: 'union' | 'union all' | 'union distinct'; } => AstStatement */ @@ -1050,10 +1225,10 @@ function peg$parse(input, options) { /* export type create_db_stmt = { type: 'create', - keyword: 'database', + keyword: 'database' | 'schema', if_not_exists?: 'if not exists', database: string, - create_definition?: create_db_definition + create_definitions?: create_db_definition } => AstStatement */ @@ -1069,7 +1244,374 @@ function peg$parse(input, options) { }, }; }; - var peg$f8 = function (a, tp, ife, t, c, to, ir, as, qe) { + var peg$f8 = function (c) { + // => string + return `with ${c.toLowerCase()} check option`; + }; + var peg$f9 = function () { + // => string + return 'with check option'; + }; + var peg$f10 = function (t) { + // => {type: string; value: string; symbol: string; } + return { type: 'check_option', value: t, symbol: '=' }; + }; + var peg$f11 = function (k, t) { + // => {type: string; value: string; symbol: string; } + return { type: k.toLowerCase(), value: t.value ? 'true' : 'false', symbol: '=' }; + }; + var peg$f12 = function (head, tail) { + // => with_view_option[] + return createList(head, tail); + }; + var peg$f13 = function (a, or, tp, r, v, c, wo, s, w) { + /* + export type create_view_stmt = { + type: 'create', + keyword: 'view', + replace?: 'or replace', + temporary?: 'temporary' | 'temp', + recursive?: 'recursive', + view: table_name, + columns?: column_list, + select: select_stmt_nake, + with_options?: with_options, + with?: string, + } + => AstStatement + */ + v.view = v.table; + delete v.table; + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: a[0].toLowerCase(), + keyword: 'view', + replace: or && 'or replace', + temporary: tp && tp.toLowerCase(), + recursive: r && r.toLowerCase(), + columns: c && c[2], + select: s, + view: v, + with_options: wo && wo[4], + with: w, + }, + }; + }; + var peg$f14 = function (n, d) { + // => { type: string; symbol: '='; value: expr; }[] + return [ + { + type: 'sfunc', + symbol: '=', + value: { schema: n.db, name: n.table }, + }, + { + type: 'stype', + symbol: '=', + value: d, + }, + ]; + }; + var peg$f15 = function (n, e) { + // => { type: string; symbol: '='; value: ident | expr; } + return { + type: n, + symbol: '=', + value: typeof e === 'string' ? { type: 'default', value: e } : e, + }; + }; + var peg$f16 = function (head, tail) { + // => create_aggregate_opt_optional[] + return createList(head, tail); + }; + var peg$f17 = function (a, or, t, s, as, opts) { + /* + export type create_aggregate_stmt = { + type: 'create', + keyword: 'aggregate', + replace?: 'or replace', + name: table_name, + args?: aggregate_signature, + options: create_aggregate_opt_optional[] + } + => AstStatement + */ + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'create', + keyword: 'aggregate', + name: { schema: s.db, name: s.table }, + args: { + parentheses: true, + expr: as, + orderby: as.orderby, + }, + options: opts, + }, + }; + }; + var peg$f18 = function (c, d) { + // => { column: column_ref; definition: data_type; } + return { + column: c, + definition: d, + }; + }; + var peg$f19 = function (head, tail) { + // => column_data_type[] + return createList(head, tail); + }; + var peg$f20 = function (k, t) { + // => { type: "returns"; keyword?: "setof"; expr: data_type; } + return { + type: 'returns', + keyword: k, + expr: t, + }; + }; + var peg$f21 = function (e) { + // => { type: "returns"; keyword?: "table"; expr: column_data_type_list; } + return { + type: 'returns', + keyword: 'table', + expr: e, + }; + }; + var peg$f22 = function (n) { + return n.toLowerCase() !== 'begin'; + }; + var peg$f23 = function (n, c, d, collate, nu, expr, s) { + // => { keyword: 'variable'; name: string, constant?: string; datatype: data_type; collate?: collate; not_null?: string; default?: { type: 'default'; keyword: string; value: literal | expr; }; } + return { + keyword: 'variable', + name: n, + constant: c, + datatype: d, + collate, + not_null: nu && 'not null', + definition: expr && + expr[0] && { + type: 'default', + keyword: expr[0], + value: expr[2], + }, + }; + }; + var peg$f24 = function (head, tail) { + // => declare_variable_item[] + return createList(head, tail, 1); + }; + var peg$f25 = function (vars) { + /* + export type declare_stmt = { type: 'declare'; declare: declare_variable_item[]; } + => AstStatement + */ + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'declare', + declare: vars, + symbol: ';', + }, + }; + }; + var peg$f26 = function (ln) { + // => literal_string + return { + prefix: 'LANGUAGE', + type: 'default', + value: ln, + }; + }; + var peg$f27 = function (ft) { + // => literal_string + if (!ft) return { type: 'origin', value: 'TRANSORM' }; + return { + prefix: ['TRANSORM', ft[0].toUpperCase(), ft[2].toUpperCase()].join(' '), + type: 'default', + value: ft[4], + }; + }; + var peg$f28 = function (i) { + // => literal_string + return { + type: 'origin', + value: i, + }; + }; + var peg$f29 = function (n) { + // => literal_string + return { + type: 'origin', + value: [n, 'LEAKPROOF'].filter((v) => v).join(' '), + }; + }; + var peg$f30 = function (i) { + // => literal_string + if (Array.isArray(i)) i = [i[0], i[2]].join(' '); + return { + type: 'origin', + value: `${i} ON NULL INPUT`, + }; + }; + var peg$f31 = function (e, i) { + // => literal_string + return { + type: 'origin', + value: [e, 'SECURITY', i].filter((v) => v).join(' '), + }; + }; + var peg$f32 = function (i) { + // => literal_string + return { + type: 'origin', + value: ['PARALLEL', i].join(' '), + }; + }; + var peg$f33 = function (c, de, b, s, e) { + return (b && e) || (!b && !e); + }; + var peg$f34 = function (c, de, b, s, e, l) { + // => { type: 'as'; begin?: string; declare?: declare_stmt; expr: multiple_stmt; end?: string; symbol: string; } + const start = c.join(''); + const end = l.join(''); + if (start !== end) throw new Error(`start symbol '${start}'is not same with end symbol '${end}'`); + return { + type: 'as', + declare: de && de.ast, + begin: b, + expr: Array.isArray(s.ast) ? s.ast.flat() : [s.ast], + end: e && e[0], + symbol: start, + }; + }; + var peg$f35 = function (p, n) { + // => literal_numeric + n.prefix = p; + return n; + }; + var peg$f36 = function (n) { + // => literal_string + return { + prefix: 'support', + type: 'default', + value: n, + }; + }; + var peg$f37 = function (ca, e) { + // => { type: "set"; parameter: ident_name; value?: { prefix: string; expr: expr }} + let value; + if (e) { + const val = Array.isArray(e[2]) ? e[2] : [e[2]]; + value = { + prefix: e[0], + expr: val.map((v) => ({ type: 'default', value: v })), + }; + } + return { + type: 'set', + parameter: ca, + value, + }; + }; + var peg$f38 = function (a, or, t, c, args, r, fo) { + /* + export type create_function_stmt = { + type: 'create'; + replace?: string; + name: { schema?: string; name: string }; + args?: alter_func_args; + returns?: func_returns; + keyword: 'function'; + options?: create_func_opt[]; + } + => AstStatement + */ + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + args: args || [], + type: 'create', + replace: or && 'or replace', + name: { schema: c.db, name: c.table }, + returns: r, + keyword: t && t.toLowerCase(), + options: fo || [], + }, + }; + }; + var peg$f39 = function (a, k, s, as, r, e) { + /* + export type create_type_stmt = { + type: 'create', + keyword: 'type', + name: { schema: string; name: string }, + as?: string, + resource?: string, + create_definitions?: any + } + => AstStatement + */ + e.parentheses = true; + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: a[0].toLowerCase(), + keyword: k.toLowerCase(), + name: { schema: s.db, name: s.table }, + as: as && as[0] && as[0].toLowerCase(), + resource: r.toLowerCase(), + create_definitions: e, + }, + }; + }; + var peg$f40 = function (a, k, s) { + // => AstStatement + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: a[0].toLowerCase(), + keyword: k.toLowerCase(), + name: { schema: s.db, name: s.table }, + }, + }; + }; + var peg$f41 = function (a, k, s, as, d, ce, de, ccc) { + /* + export type create_domain_stmt = { + type: 'create', + keyword: 'domain', + domain: { schema: string; name: string }, + as?: string, + target: data_type, + create_definitions?: any[] + } + => AstStatement + */ + if (ccc) ccc.type = 'constraint'; + const definitions = [ce, de, ccc].filter((v) => v); + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: a[0].toLowerCase(), + keyword: k.toLowerCase(), + domain: { schema: s.db, name: s.table }, + as: as && as[0] && as[0].toLowerCase(), + target: d, + create_definitions: definitions, + }, + }; + }; + var peg$f42 = function (a, tp, ife, t, c, to, ir, as, qe) { /* export type create_table_stmt_node = create_table_stmt_node_simple | create_table_stmt_node_like; export interface create_table_stmt_node_base { @@ -1083,7 +1625,7 @@ function peg$parse(input, options) { ignore_replace?: 'ignore' | 'replace'; as?: 'as'; query_expr?: union_stmt_node; - create_definition?: create_table_definition; + create_definitions?: create_table_definition; table_options?: table_options; } => AstStatement @@ -1106,7 +1648,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f9 = function (a, tp, ife, t, lt) { + var peg$f43 = function (a, tp, ife, t, lt) { /* export interface create_table_stmt_node_like extends create_table_stmt_node_base{ @@ -1128,7 +1670,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f10 = function (a, tp, ife, t, as, c) { + var peg$f44 = function (a, tp, ife, t, as, c) { /* export type create_sequence_stmt = { type: 'create', @@ -1136,7 +1678,7 @@ function peg$parse(input, options) { temporary?: 'temporary' | 'temp', if_not_exists?: 'if not exists', table: table_ref_list, - create_definition?: create_sequence_definition_list + create_definitions?: create_sequence_definition_list } => AstStatement */ @@ -1154,7 +1696,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f11 = function (k, b, n) { + var peg$f45 = function (k, b, n) { /* export type sequence_definition = { "resource": "sequence", prefix?: string,value: literal | column_ref } => sequence_definition @@ -1165,7 +1707,7 @@ function peg$parse(input, options) { value: n, }; }; - var peg$f12 = function (k, n) { + var peg$f46 = function (k, n) { // => sequence_definition return { resource: 'sequence', @@ -1173,7 +1715,7 @@ function peg$parse(input, options) { value: n, }; }; - var peg$f13 = function () { + var peg$f47 = function () { // => sequence_definition return { resource: 'sequence', @@ -1183,7 +1725,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f14 = function (k, n) { + var peg$f48 = function (k, n) { // => sequence_definition return { resource: 'sequence', @@ -1191,7 +1733,7 @@ function peg$parse(input, options) { value: n, }; }; - var peg$f15 = function () { + var peg$f49 = function () { // => sequence_definition return { resource: 'sequence', @@ -1201,7 +1743,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f16 = function (k, w, n) { + var peg$f50 = function (k, w, n) { // => sequence_definition return { resource: 'sequence', @@ -1209,7 +1751,7 @@ function peg$parse(input, options) { value: n, }; }; - var peg$f17 = function (k, n) { + var peg$f51 = function (k, n) { // => sequence_definition return { resource: 'sequence', @@ -1217,7 +1759,7 @@ function peg$parse(input, options) { value: n, }; }; - var peg$f18 = function (n) { + var peg$f52 = function (n) { // => sequence_definition return { resource: 'sequence', @@ -1227,7 +1769,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f19 = function () { + var peg$f53 = function () { // => sequence_definition return { resource: 'sequence', @@ -1238,7 +1780,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f20 = function (n, col) { + var peg$f54 = function (n, col) { // => sequence_definition return { resource: 'sequence', @@ -1246,11 +1788,11 @@ function peg$parse(input, options) { value: col, }; }; - var peg$f21 = function (head, tail) { + var peg$f55 = function (head, tail) { // => create_sequence_definition[] return createList(head, tail, 1); }; - var peg$f22 = function (a, kw, t, co, n, on, ta, um, cols, wr, ts, w) { + var peg$f56 = function (a, kw, t, co, n, on, ta, um, cols, wr, ts, w) { /* export interface create_index_stmt_node { type: 'create'; @@ -1289,11 +1831,11 @@ function peg$parse(input, options) { }, }; }; - var peg$f23 = function (head, tail) { + var peg$f57 = function (head, tail) { // => column_order[] return createList(head, tail); }; - var peg$f24 = function (c, ca, op, o, nf) { + var peg$f58 = function (c, ca, op, o, nf) { /* => { collate: collate_expr; @@ -1310,68 +1852,71 @@ function peg$parse(input, options) { nulls: nf && `${nf[0].toLowerCase()} ${nf[2].toLowerCase()}`, }; }; - var peg$f25 = function (t) { + var peg$f59 = function (t) { // => { type: 'like'; table: table_ref_list; } return { type: 'like', table: t, }; }; - var peg$f26 = function (e) { + var peg$f60 = function (e) { // => create_like_table_simple & { parentheses?: boolean; } e.parentheses = true; return e; }; - var peg$f27 = function (head, tail) { + var peg$f61 = function (head, tail) { // => create_definition[] return createList(head, tail); }; - var peg$f28 = function (a) { + var peg$f62 = function (a) { // => { auto_increment: 'auto_increment'; } return { auto_increment: a.toLowerCase() }; }; - var peg$f29 = function (u) { - // => { unique_or_primary: 'unique' | 'primary key'; } - const unique_or_primary = []; - if (u) unique_or_primary.push(u[0], u[2]); - return { - unique_or_primary: unique_or_primary - .filter((v) => v) - .join(' ') - .toLowerCase(''), - }; + var peg$f63 = function (k) { + // => { unique: 'unique' | 'unique key'; } + const sql = ['unique']; + if (k) sql.push(k); + return { unique: sql.join(' ').toLowerCase('') }; }; - var peg$f30 = function (co) { + var peg$f64 = function (p) { + // => { unique: 'key' | 'primary key'; } + const sql = []; + if (p) sql.push('primary'); + sql.push('key'); + return { primary_key: sql.join(' ').toLowerCase('') }; + }; + var peg$f65 = function (co) { // => { comment: keyword_comment; } return { comment: co }; }; - var peg$f31 = function (ca) { + var peg$f66 = function (ca) { // => { collate: collate_expr; } return { collate: ca }; }; - var peg$f32 = function (cf) { + var peg$f67 = function (cf) { // => { column_format: column_format; } return { column_format: cf }; }; - var peg$f33 = function (s) { + var peg$f68 = function (s) { // => { storage: storage } return { storage: s }; }; - var peg$f34 = function (re) { + var peg$f69 = function (re) { // => { reference_definition: reference_definition; } return { reference_definition: re }; }; - var peg$f35 = function (t, s, v) { + var peg$f70 = function (t, s, v) { // => { character_set: collate_expr } return { character_set: { type: t, value: v, symbol: s } }; }; - var peg$f36 = function (head, tail) { + var peg$f71 = function (head, tail) { /* => { nullable?: column_constraint['nullable']; default_val?: column_constraint['default_val']; auto_increment?: 'auto_increment'; - unique_or_primary?: 'unique' | 'primary key'; + unique?: 'unique' | 'unique key'; + primary?: 'key' | 'primary key'; comment?: keyword_comment; collate?: collate_expr; column_format?: column_format; @@ -1385,7 +1930,7 @@ function peg$parse(input, options) { } return opt; }; - var peg$f37 = function (c, d, cdo) { + var peg$f72 = function (c, d, cdo) { /* => { column: column_ref; @@ -1393,7 +1938,8 @@ function peg$parse(input, options) { nullable: column_constraint['nullable']; default_val: column_constraint['default_val']; auto_increment?: 'auto_increment'; - unique_or_primary?: 'unique' | 'primary key'; + unique?: 'unique' | 'unique key'; + primary?: 'key' | 'primary key'; comment?: keyword_comment; collate?: collate_expr; column_format?: column_format; @@ -1410,7 +1956,7 @@ function peg$parse(input, options) { ...(cdo || {}), }; }; - var peg$f38 = function (n, df) { + var peg$f73 = function (n, df) { // => { nullable: literal_null | literal_not_null; default_val: default_expr; } if (n && !n.value) n.value = 'null'; return { @@ -1418,7 +1964,7 @@ function peg$parse(input, options) { nullable: n, }; }; - var peg$f39 = function (df, n) { + var peg$f74 = function (df, n) { // => { nullable: literal_null | literal_not_null; default_val: default_expr; } if (n && !n.value) n.value = 'null'; return { @@ -1426,7 +1972,7 @@ function peg$parse(input, options) { nullable: n, }; }; - var peg$f40 = function (s, ca) { + var peg$f75 = function (s, ca) { // => { type: 'collate'; symbol: '=' | null; value: ident; } return { type: 'collate', @@ -1434,32 +1980,40 @@ function peg$parse(input, options) { value: ca, }; }; - var peg$f41 = function (k, f) { + var peg$f76 = function (k, f) { // => { type: 'column_format'; value: 'fixed' | 'dynamic' | 'default'; } return { type: 'column_format', value: f.toLowerCase(), }; }; - var peg$f42 = function (k, s) { + var peg$f77 = function (k, s) { // => { type: 'storage'; value: 'disk' | 'memory' } return { type: 'storage', value: s.toLowerCase(), }; }; - var peg$f43 = function (ce) { + var peg$f78 = function (kw, ce) { + // => { type: 'default'; keyword: string, value: literal | expr; } + return { + type: 'default', + keyword: kw && kw[0], + value: ce, + }; + }; + var peg$f79 = function (ce) { // => { type: 'default'; value: literal | expr; } return { type: 'default', value: ce, }; }; - var peg$f44 = function (head, tail) { + var peg$f80 = function (head, tail) { // => (ALTER_ALGORITHM | ALTER_LOCK)[] return createList(head, tail, 1); }; - var peg$f45 = function (a, r, t) { + var peg$f81 = function (a, r, t) { /* export interface drop_stmt_node { type: 'drop'; @@ -1479,7 +2033,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f46 = function (a, r, cu, ie, i, op) { + var peg$f82 = function (a, r, cu, ie, i, op) { /* export interface drop_index_stmt_node { type: 'drop'; @@ -1502,7 +2056,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f47 = function (a, kw, t) { + var peg$f83 = function (a, kw, t) { /* export interface truncate_stmt_node { type: 'trucate'; @@ -1522,7 +2076,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f48 = function (d) { + var peg$f84 = function (d) { /* export interface use_stmt_node { type: 'use'; @@ -1540,7 +2094,132 @@ function peg$parse(input, options) { }, }; }; - var peg$f49 = function (t, e) { + var peg$f85 = function () { + // => { name: ”*“ } + return [ + { + name: '*', + }, + ]; + }; + var peg$f86 = function (s, o) { + // => alter_func_args + const ans = s || []; + ans.orderby = o; + return ans; + }; + var peg$f87 = function (t) { + // => ignore + return t.toUpperCase(); + }; + var peg$f88 = function (m, ad, de) { + // => { mode?: string; name?: string; type: data_type; default: default_arg_expr; } + return { + mode: m, + type: ad, + default: de, + }; + }; + var peg$f89 = function (m, an, ad, de) { + // => { mode?: string; name?: string; type: data_type; default: default_arg_expr; } + return { + mode: m, + name: an, + type: ad, + default: de, + }; + }; + var peg$f90 = function (head, tail) { + // => alter_func_arg_item[] + return createList(head, tail); + }; + var peg$f91 = function (t, s, as, ac) { + // => AstStatement + const keyword = t.toLowerCase(); + ac.resource = keyword; + ac[keyword] = ac.table; + delete ac.table; + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'alter', + keyword, + name: { schema: s.db, name: s.table }, + args: { + parentheses: true, + expr: as, + orderby: as.orderby, + }, + expr: ac, + }, + }; + }; + var peg$f92 = function (t, s, ags, ac) { + // => AstStatement + const keyword = t.toLowerCase(); + ac.resource = keyword; + ac[keyword] = ac.table; + delete ac.table; + const args = {}; + if (ags && ags[0]) args.parentheses = true; + args.expr = ags && ags[2]; + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'alter', + keyword, + name: { schema: s.db, name: s.table }, + args, + expr: ac, + }, + }; + }; + var peg$f93 = function (t, s, ac) { + /* + export interface alter_resource_stmt_node { + type: 'alter'; + keyword: 'domain' | 'type', + name: string | { schema: string, name: string }; + args?: { parentheses: true; expr?: alter_func_args; orderby?: alter_func_args; }; + expr: alter_rename_owner; + } + => AstStatement + */ + const keyword = t.toLowerCase(); + ac.resource = keyword; + ac[keyword] = ac.table; + delete ac.table; + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'alter', + keyword, + name: { schema: s.db, name: s.table }, + expr: ac, + }, + }; + }; + var peg$f94 = function (t, s, ac) { + // => AstStatement + const keyword = t.toLowerCase(); + ac.resource = keyword; + ac[keyword] = ac.table; + delete ac.table; + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'alter', + keyword, + schema: s, + expr: ac, + }, + }; + }; + var peg$f95 = function (t, e) { /* export interface alter_table_stmt_node { type: 'alter'; @@ -1560,11 +2239,11 @@ function peg$parse(input, options) { }, }; }; - var peg$f50 = function (head, tail) { + var peg$f96 = function (head, tail) { // => alter_action[] return createList(head, tail); }; - var peg$f51 = function (kc, cd) { + var peg$f97 = function (kc, cd) { /* => { action: 'add'; @@ -1581,7 +2260,7 @@ function peg$parse(input, options) { type: 'alter', }; }; - var peg$f52 = function (kc, c) { + var peg$f98 = function (kc, c) { /* => { action: 'drop'; collumn: column_ref; @@ -1597,7 +2276,7 @@ function peg$parse(input, options) { type: 'alter', }; }; - var peg$f53 = function (c) { + var peg$f99 = function (c) { /* => { action: 'add'; create_definitions: create_db_definition; @@ -1611,7 +2290,7 @@ function peg$parse(input, options) { type: 'alter', }; }; - var peg$f54 = function (id) { + var peg$f100 = function (id) { /* => { action: 'add'; type: 'alter'; @@ -1622,14 +2301,17 @@ function peg$parse(input, options) { ...id, }; }; - var peg$f55 = function (kw, tn) { - /* => { - action: 'rename'; - type: 'alter'; - resource: 'table'; - keyword?: 'to' | 'as'; - table: ident; - } */ + var peg$f101 = function (kw, tn) { + /* + export interface alter_rename_owner { + action: string; + type: 'alter'; + resource: string; + keyword?: 'to' | 'as'; + [key: string]: ident; + } + => AstStatement + */ return { action: 'rename', type: 'alter', @@ -1638,7 +2320,27 @@ function peg$parse(input, options) { table: tn, }; }; - var peg$f56 = function (s, val) { + var peg$f102 = function (tn) { + // => AstStatement + return { + action: 'owner', + type: 'alter', + resource: 'table', + keyword: 'to', + table: tn, + }; + }; + var peg$f103 = function (s) { + // => AstStatement + return { + action: 'set', + type: 'alter', + resource: 'table', + keyword: 'schema', + table: s, + }; + }; + var peg$f104 = function (s, val) { /* => { type: 'alter'; keyword: 'algorithm'; @@ -1654,7 +2356,7 @@ function peg$parse(input, options) { algorithm: val, }; }; - var peg$f57 = function (s, val) { + var peg$f105 = function (s, val) { /* => { type: 'alter'; keyword: 'lock'; @@ -1670,7 +2372,7 @@ function peg$parse(input, options) { lock: val, }; }; - var peg$f58 = function (kc, c, t, de, id) { + var peg$f106 = function (kc, c, t, de, id) { /* => { index: column; definition: cte_column_definition; @@ -1688,7 +2390,7 @@ function peg$parse(input, options) { index_options: id, }; }; - var peg$f59 = function (p, kc, c, de, id) { + var peg$f107 = function (p, kc, c, de, id) { /* => { index: column; definition: cte_column_definition; @@ -1704,18 +2406,35 @@ function peg$parse(input, options) { resource: 'index', }; }; - var peg$f60 = function (kc, c) { + var peg$f108 = function (kc, c) { // => { keyword: 'constraint'; constraint: ident; } return { keyword: kc.toLowerCase(), constraint: c, }; }; - var peg$f61 = function (kc, p, t, de, id) { + var peg$f109 = function (kc, p, e) { + /* => { + constraint?: constraint_name['constraint']; + definition: or_and_where_expr; + keyword?: constraint_name['keyword']; + constraint_type: 'check'; + resource: 'constraint'; + }*/ + return { + constraint: kc && kc.constraint, + definition: [e], + constraint_type: p.toLowerCase(), + keyword: kc && kc.keyword, + resource: 'constraint', + }; + }; + var peg$f110 = function (kc, p, t, de, id) { /* => { constraint?: constraint_name['constraint']; definition: cte_column_definition; constraint_type: 'primary key'; + keyword?: constraint_name['keyword']; index_type?: index_type; resource: 'constraint'; index_options?: index_options; @@ -1730,11 +2449,12 @@ function peg$parse(input, options) { index_options: id, }; }; - var peg$f62 = function (kc, u, p, i, t, de, id) { + var peg$f111 = function (kc, u, p, i, t, de, id) { /* => { constraint?: constraint_name['constraint']; definition: cte_column_definition; constraint_type: 'unique key' | 'unique' | 'unique index'; + keyword?: constraint_name['keyword']; index_type?: index_type; resource: 'constraint'; index_options?: index_options; @@ -1750,7 +2470,7 @@ function peg$parse(input, options) { index_options: id, }; }; - var peg$f63 = function (kc, p, i, de, id) { + var peg$f112 = function (kc, p, i, de, id) { /* => { constraint?: constraint_name['constraint']; definition: cte_column_definition; @@ -1770,7 +2490,7 @@ function peg$parse(input, options) { reference_definition: id, }; }; - var peg$f64 = function (kc, t, de, m, od, ou) { + var peg$f113 = function (kc, t, de, m, od, ou) { /* => { definition: cte_column_definition; table: table_ref_list; @@ -1786,7 +2506,7 @@ function peg$parse(input, options) { on_action: [od, ou].filter((v) => v), }; }; - var peg$f65 = function (oa) { + var peg$f114 = function (oa) { /* => { on_action: [on_reference]; } @@ -1795,22 +2515,34 @@ function peg$parse(input, options) { on_action: [oa], }; }; - var peg$f66 = function (kw, ro) { + var peg$f115 = function (kw, ro) { // => { type: 'on delete' | 'on update'; value: reference_option; } return { type: `on ${kw[0].toLowerCase()}`, value: ro, }; }; - var peg$f67 = function (kc) { - // => 'restrict' | 'cascade' | 'set null' | 'no action' | 'set default' - return kc.toLowerCase(); + var peg$f116 = function (kw, l) { + // => { type: 'function'; name: string; args: expr_list; } + return { + type: 'function', + name: kw, + args: l, + }; }; - var peg$f68 = function (kw, kc, t, c, p, te, on, tn, fr, de, fe, tw, fc, fct) { + var peg$f117 = function (kc) { + // => 'restrict' | 'cascade' | 'set null' | 'no action' | 'set default' | 'current_timestamp' + return { + type: 'origin', + value: kc.toLowerCase(), + }; + }; + var peg$f118 = function (kw, or, kc, t, c, p, te, on, tn, fr, de, fe, tw, fc, e, fct) { /* => { type: 'create'; - constraint: string; + replace?: string; + constraint?: string; location: 'before' | 'after' | 'instead of'; events: trigger_event_list; table: table_name; @@ -1819,7 +2551,7 @@ function peg$parse(input, options) { for_each?: trigger_for_row; when?: trigger_when; execute: { - keyword: 'execute procedure'; + keyword: string; expr: proc_func_call; }; constraint_type: 'trigger'; @@ -1830,6 +2562,7 @@ function peg$parse(input, options) { */ return { type: 'create', + replace: or && 'or replace', constraint: c, location: p && p.toLowerCase(), events: te, @@ -1839,7 +2572,7 @@ function peg$parse(input, options) { for_each: fe, when: tw, execute: { - keyword: 'execute procedure', + keyword: `execute ${e.toLowerCase()}`, expr: fct, }, constraint_type: t && t.toLowerCase(), @@ -1848,39 +2581,39 @@ function peg$parse(input, options) { resource: 'constraint', }; }; - var peg$f69 = function (kw) { + var peg$f119 = function (kw) { // => { keyword: 'insert' | 'delete' | 'truncate' } const keyword = Array.isArray(kw) ? kw[0].toLowerCase() : kw.toLowerCase(); return { keyword, }; }; - var peg$f70 = function (kw, a) { + var peg$f120 = function (kw, a) { // => { keyword: 'update'; args?: { keyword: 'of', columns: column_ref_list; }} return { keyword: kw && kw[0] && kw[0].toLowerCase(), args: (a && { keyword: a[0], columns: a[2] }) || null, }; }; - var peg$f71 = function (head, tail) { + var peg$f121 = function (head, tail) { // => trigger_event[]; return createList(head, tail); }; - var peg$f72 = function (kw, args) { + var peg$f122 = function (kw, args) { // => { keyword: 'deferrable' | 'not deferrable'; args: 'initially immediate' | 'initially deferred' } return { keyword: kw && kw[0] ? `${kw[0].toLowerCase()} deferrable` : 'deferrable', args: args && args.toLowerCase(), }; }; - var peg$f73 = function (kw, e, ob) { + var peg$f123 = function (kw, e, ob) { // => { keyword: 'for' | 'for each'; args: 'row' | 'statement' } return { keyword: e ? `${kw.toLowerCase()} ${e.toLowerCase()}` : kw.toLowerCase(), args: ob.toLowerCase(), }; }; - var peg$f74 = function (condition) { + var peg$f124 = function (condition) { // => { type: 'when'; cond: expr; parentheses: true; } return { type: 'when', @@ -1888,15 +2621,15 @@ function peg$parse(input, options) { parentheses: true, }; }; - var peg$f75 = function (head, tail) { + var peg$f125 = function (head, tail) { // => table_option[] return createList(head, tail); }; - var peg$f76 = function () { + var peg$f126 = function () { // => string return 'CHARACTER SET'; }; - var peg$f77 = function (kw, t, s, v) { + var peg$f127 = function (kw, t, s, v) { /* => { keyword: 'character set' | 'charset' | 'collate' | 'default character set' | 'default charset' | 'default collate'; symbol: '='; @@ -1908,7 +2641,7 @@ function peg$parse(input, options) { value: v, }; }; - var peg$f78 = function (kw, s, v) { + var peg$f128 = function (kw, s, v) { /* => { keyword: 'auto_increment' | 'avg_row_length' | 'key_block_size' | 'max_rows' | 'min_rows' | 'stats_sample_pages'; symbol: '='; @@ -1920,7 +2653,7 @@ function peg$parse(input, options) { value: v.value, }; }; - var peg$f79 = function (kw, s, c) { + var peg$f129 = function (kw, s, c) { // => { keyword: 'connection' | 'comment'; symbol: '='; value: string; } return { keyword: kw.toLowerCase(), @@ -1928,7 +2661,7 @@ function peg$parse(input, options) { value: `'${c.value}'`, }; }; - var peg$f80 = function (kw, s, v) { + var peg$f130 = function (kw, s, v) { // => { keyword: 'compression'; symbol: '='; value: "'ZLIB'" | "'LZ4'" | "'NONE'" } return { keyword: kw.toLowerCase(), @@ -1936,7 +2669,7 @@ function peg$parse(input, options) { value: v.join('').toUpperCase(), }; }; - var peg$f81 = function (kw, s, c) { + var peg$f131 = function (kw, s, c) { // => { keyword: 'engine'; symbol: '='; value: string; } return { keyword: kw.toLowerCase(), @@ -1944,7 +2677,7 @@ function peg$parse(input, options) { value: c.toUpperCase(), }; }; - var peg$f82 = function (fsid) { + var peg$f132 = function (fsid) { // => create_fulltext_spatial_index_definition & { action: 'add'; type: 'alter' } return { action: 'add', @@ -1952,7 +2685,7 @@ function peg$parse(input, options) { ...fsid, }; }; - var peg$f83 = function (t) { + var peg$f133 = function (t) { /* export interface rename_stmt_node { type: 'rename'; @@ -1970,7 +2703,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f84 = function (kw, a) { + var peg$f134 = function (kw, a) { /* export interface set_stmt_node { type: 'set'; @@ -1988,13 +2721,13 @@ function peg$parse(input, options) { }, }; }; - var peg$f85 = function (m) { + var peg$f135 = function (m) { // => { mode: string; } return { mode: `in ${m.toLowerCase()} mode`, }; }; - var peg$f86 = function (k, t, lm, nw) { + var peg$f136 = function (k, t, lm, nw) { /* export interface lock_stmt_node { type: 'lock'; @@ -2019,7 +2752,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f87 = function (e) { + var peg$f137 = function (e) { /* export interface call_stmt_node { type: 'call'; @@ -2036,7 +2769,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f88 = function () { + var peg$f138 = function () { return { /* export interface show_stmt_node { @@ -2054,7 +2787,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f89 = function (c) { + var peg$f139 = function (c) { return { // => AstStatement tableList: Array.from(tableList), @@ -2066,7 +2799,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f90 = function (p, i) { + var peg$f140 = function (p, i) { return { /* export interface deallocate_stmt_node { @@ -2085,16 +2818,361 @@ function peg$parse(input, options) { }, }; }; - var peg$f91 = function () { + var peg$f141 = function (p) { + /* export interface origin_str_stmt { + type: 'origin'; + value: string; + } + => origin_str_stmt + */ + return { + type: 'origin', + value: Array.isArray(p) ? p[0] : p, + }; + }; + var peg$f142 = function (p) { + // => origin_str_stmt + return { + type: 'origin', + value: Array.isArray(p) ? p[0] : p, + }; + }; + var peg$f143 = function (p) { + // => origin_str_stmt + return { + type: 'origin', + value: Array.isArray(p) ? p[0] : p, + }; + }; + var peg$f144 = function (p) { + // => origin_str_stmt + return { + type: 'origin', + value: p ? 'all privileges' : 'all', + }; + }; + var peg$f145 = function (p) { + // => origin_str_stmt + return { + type: 'origin', + value: p, + }; + }; + var peg$f146 = function (p) { + // => origin_str_stmt + return { + type: 'origin', + value: p, + }; + }; + var peg$f147 = function (p, c) { + // => { priv: priv_type; columns: column_ref_list; } + return { + priv: p, + columns: c && c[2], + }; + }; + var peg$f148 = function (head, tail) { + // => priv_item[] + return createList(head, tail); + }; + var peg$f149 = function (o) { + // => origin_str_stmt + return { + type: 'origin', + value: o.toUpperCase(), + }; + }; + var peg$f150 = function (i) { + // => origin_str_stmt + return { + type: 'origin', + value: `all ${i} in schema`, + }; + }; + var peg$f151 = function (prefix, name) { + // => { prefix: string; name: string; } + return { + prefix: prefix && prefix[0], + name, + }; + }; + var peg$f152 = function (head, tail) { + // => priv_level[] + return createList(head, tail); + }; + var peg$f153 = function (g, i) { + // => origin_str_stmt + const name = g ? `${group} ${i}` : i; + return { + name: { type: 'origin', value: name }, + }; + }; + var peg$f154 = function (i) { + // => origin_str_stmt + return { + name: { type: 'origin', value: i }, + }; + }; + var peg$f155 = function (head, tail) { + // => user_or_role[] + return createList(head, tail); + }; + var peg$f156 = function () { + // => origin_str_stmt + return { + type: 'origin', + value: 'with grant option', + }; + }; + var peg$f157 = function () { + // => origin_str_stmt + return { + type: 'origin', + value: 'with admin option', + }; + }; + var peg$f158 = function () { + // => { type: 'grant' } + return { + type: 'grant', + }; + }; + var peg$f159 = function (i) { + // => { type: 'revoke'; grant_option_for?: origin_str_stmt; } + return { + type: 'revoke', + grant_option_for: i && { type: 'origin', value: 'grant option for' }, + }; + }; + var peg$f160 = function (g, pl, ot, le, t) { + const obj = { revoke: 'from', grant: 'to' }; + return obj[g.type].toLowerCase() === t[0].toLowerCase(); + }; + var peg$f161 = function (g, pl, ot, le, t, to, wo) { + /* export interface grant_revoke_stmt { + type: string; + grant_option_for?: origin_str_stmt; + keyword: 'priv'; + objects: priv_list; + on: { + object_type?: object_type; + priv_level: priv_level_list; + }; + to_from: 'to' | 'from'; + user_or_roles?: user_or_role_list; + with?: with_grant_option; + } + => AstStatement + */ + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + ...g, + keyword: 'priv', + objects: pl, + on: { + object_type: ot, + priv_level: le, + }, + to_from: t[0], + user_or_roles: to, + with: wo, + }, + }; + }; + var peg$f162 = function (g, o, t) { + const obj = { revoke: 'from', grant: 'to' }; + return obj[g.type].toLowerCase() === t[0].toLowerCase(); + }; + var peg$f163 = function (g, o, t, to, wo) { + // => => AstStatement + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + ...g, + keyword: 'role', + objects: o.map((name) => ({ priv: { type: 'string', value: name } })), + to_from: t[0], + user_or_roles: to, + with: wo, + }, + }; + }; + var peg$f164 = function (e, ia, s) { + // => { type: 'elseif'; boolean_expr: expr; then: curd_stmt; semicolon?: string; } + return { + type: 'elseif', + boolean_expr: e, + then: ia, + semicolon: s, + }; + }; + var peg$f165 = function (head, tail) { + // => elseif_stmt[] + return createList(head, tail, 1); + }; + var peg$f166 = function (ie, ia, s, ei, el, es) { + /* export interface if_else_stmt { + type: 'if'; + keyword: 'if'; + boolean_expr: expr; + semicolons: string[]; + if_expr: crud_stmt; + elseif_expr: elseif_stmt[]; + else_expr: curd_stmt; + prefix: literal_string; + suffix: literal_string; + } + => AstStatement + */ + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'if', + keyword: 'if', + boolean_expr: ie, + semicolons: [s || '', es || ''], + prefix: { + type: 'origin', + value: 'then', + }, + if_expr: ia, + elseif_expr: ei, + else_expr: el && el[2], + suffix: { + type: 'origin', + value: 'end if', + }, + }, + }; + }; + var peg$f167 = function (o, e, es) { + // => { type: 'using'; option: string; symbol: '='; expr: expr[]; } + const expr = [e]; + if (es) es.forEach((ex) => expr.push(ex[3])); + return { + type: 'using', + option: o, + symbol: '=', + expr, + }; + }; + var peg$f168 = function (format, e) { + // => IGNORE + return { + type: 'format', + keyword: format, + expr: e && e.map((ex) => ex[3]), + }; + }; + var peg$f169 = function (ss) { + // => IGNORE + return { + type: 'sqlstate', + keyword: { type: 'origin', value: 'SQLSTATE' }, + expr: [ss], + }; + }; + var peg$f170 = function (n) { + // => IGNORE + return { + type: 'condition', + expr: [{ type: 'default', value: n }], + }; + }; + var peg$f171 = function (l, r, using) { + /* export interface raise_stmt { + type: 'raise'; + level?: string; + raise?: raise_item; + using?: raise_opt; + } + => AstStatement + */ + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'raise', + level: l, + using, + raise: r, + }, + }; + }; + var peg$f172 = function (name, a) { + /* export interface execute_stmt { + type: 'execute'; + name: string; + args?: { type: expr_list; value: proc_primary_list; } + } + => AstStatement + */ + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'execute', + name, + args: a && { type: 'expr_list', value: a[2] }, + }, + }; + }; + var peg$f173 = function () { + // => { label?: string; keyword: 'for'; } + return { + label: null, + keyword: 'for', + }; + }; + var peg$f174 = function (label) { + // => IGNORE + return { + label, + keyword: 'for', + }; + }; + var peg$f175 = function (f, target, query, stmts, label) { + if (f.label && label && f.label === label) return true; + if (!f.label && !label) return true; + return false; + }; + var peg$f176 = function (f, target, query, stmts, label) { + /* export interface for_loop_stmt { + type: 'for'; + label?: string + target: string; + query: select_stmt; + stmts: multiple_stmt; + } + => AstStatement + */ + return { + tableList: Array.from(tableList), + columnList: columnListTableAlias(columnList), + ast: { + type: 'for', + label, + target, + query, + stmts: stmts.ast, + }, + }; + }; + var peg$f177 = function () { // => { type: 'select'; } return { type: 'select', }; }; - var peg$f92 = function (s) { + var peg$f178 = function (s) { /* export interface select_stmt_node extends select_stmt_nake { - parentheses_symbol: true; + parentheses: true; } => select_stmt_node */ @@ -2103,25 +3181,25 @@ function peg$parse(input, options) { parentheses_symbol: true, }; }; - var peg$f93 = function (head, tail) { + var peg$f179 = function (head, tail) { // => cte_definition[] return createList(head, tail); }; - var peg$f94 = function (cte) { - // => [cte_definition & {recursive: true; }] + var peg$f180 = function (cte) { + // => [cte_definition & { recursive: true; }] cte.recursive = true; return [cte]; }; - var peg$f95 = function (name, columns, stmt) { + var peg$f181 = function (name, columns, stmt) { // => { name: { type: 'default'; value: string; }; stmt: crud_stmt; columns?: cte_column_definition; } if (typeof name === 'string') name = { type: 'default', value: name }; return { name, stmt: stmt.ast, columns }; }; - var peg$f96 = function (l) { + var peg$f182 = function (l) { // => column_ref_list return l; }; - var peg$f97 = function (d, o, c) { + var peg$f183 = function (d, o, c) { // => {type: string; columns: column_ref_list;} console.lo; return { @@ -2129,13 +3207,13 @@ function peg$parse(input, options) { columns: c, }; }; - var peg$f98 = function (d) { + var peg$f184 = function (d) { // => { type: string | undefined; } return { type: d, }; }; - var peg$f99 = function (cte, opts, d, c, ci, f, fi, w, g, h, o, l, win, li) { + var peg$f185 = function (cte, opts, d, c, ci, f, fi, w, g, h, o, l, win, li) { /* => { with?: with_clause; type: 'select'; @@ -2174,7 +3252,7 @@ function peg$parse(input, options) { window: win, }; }; - var peg$f100 = function (head, tail) { + var peg$f186 = function (head, tail) { // => query_option[] const opts = [head]; for (let i = 0, l = tail.length; i < l; ++i) { @@ -2182,59 +3260,52 @@ function peg$parse(input, options) { } return opts; }; - var peg$f101 = function (option) { + var peg$f187 = function (option) { // => 'SQL_CALC_FOUND_ROWS'| 'SQL_CACHE'| 'SQL_NO_CACHE'| 'SQL_BIG_RESULT'| 'SQL_SMALL_RESULT'| 'SQL_BUFFER_RESULT' return option; }; - var peg$f102 = function (head, tail) { + var peg$f188 = function (head, tail) { // => 'ALL' | '*' | column_list_item[] columnList.add('select::null::(.*)'); - if (tail && tail.length > 0) { - head[0] = { - expr: { - type: 'column_ref', - table: null, - column: '*', - }, - as: null, - }; - return createList(head[0], tail); - } - return head[0]; + const item = { + expr: { + type: 'column_ref', + table: null, + column: '*', + }, + as: null, + }; + if (tail && tail.length > 0) return createList(item, tail); + return [item]; }; - var peg$f103 = function (head, tail) { + var peg$f189 = function (head, tail) { // => column_list_item[] return createList(head, tail); }; - var peg$f104 = function (n) { + var peg$f190 = function (n) { // => { brackets: boolean, number: number } return { brackets: true, - number: n, + index: n, }; }; - var peg$f105 = function (e, a) { - // => (expr || binary_expr) & { array_index: array_index } + var peg$f191 = function (e, a) { + // => binary_expr & { array_index: array_index } if (a) e.array_index = a; return e; }; - var peg$f106 = function (e, a) { - // => (_expr || binary_expr) & { array_index: array_index } - if (a) e.array_index = a; - return e; - }; - var peg$f107 = function (p, t, s) { + var peg$f192 = function (p, t, s) { // => data_type & { quoted?: string } if ((p && !s) || (!p && s)) throw new Error('double quoted not match'); if (p && s) t.quoted = '"'; return t; }; - var peg$f108 = function (c) { + var peg$f193 = function (c) { // => { expr: expr; as: null; } return { expr: c, as: null }; }; - var peg$f109 = function (e, s, t, tail, alias) { - // => { type: 'cast'; expr: expr; symbol: '::'; target: cast_data_type; as?: null; } + var peg$f194 = function (e, s, t, a, tail, alias) { + // => { type: 'cast'; expr: expr; symbol: '::'; target: cast_data_type; as?: null; arrows?: ('->>' | '->')[]; property?: (literal_string | literal_numeric)[]; } return { as: alias, type: 'cast', @@ -2242,9 +3313,11 @@ function peg$parse(input, options) { symbol: '::', target: t, tail: tail && tail[0] && { operator: tail[0][1], expr: tail[0][3] }, + arrows: a.map((item) => item[0]), + properties: a.map((item) => item[2]), }; }; - var peg$f110 = function (tbl, pro) { + var peg$f195 = function (tbl, pro) { // => { expr: column_ref; as: null; } const mid = pro && pro[0]; let schema; @@ -2264,7 +3337,7 @@ function peg$parse(input, options) { as: null, }; }; - var peg$f111 = function (tbl) { + var peg$f196 = function (tbl) { // => { expr: column_ref; as: null; } const table = (tbl && tbl[0]) || null; columnList.add(`select::${table}::(.*)`); @@ -2277,28 +3350,28 @@ function peg$parse(input, options) { as: null, }; }; - var peg$f112 = function (c, d) { + var peg$f197 = function (c, d) { if (d) return true; }; - var peg$f113 = function (c, d, alias) { + var peg$f198 = function (c, d, alias) { // => { type: 'expr'; expr: expr; as?: alias_clause; } columnList.add(`select::null::${c}`); return { type: 'expr', expr: { type: 'column_ref', table: null, column: c }, as: alias }; }; - var peg$f114 = function (e, alias) { + var peg$f199 = function (e, alias) { // => { type: 'expr'; expr: expr; as?: alias_clause; } return { type: 'expr', expr: e, as: alias }; }; - var peg$f115 = function (i) { + var peg$f200 = function (i) { /*=>alias_ident*/ return i; }; - var peg$f116 = function (i) { + var peg$f201 = function (i) { /*=>alias_ident*/ return i; }; - var peg$f117 = function (i) { + var peg$f202 = function (i) { /*=>ident*/ return i; }; - var peg$f118 = function (v) { + var peg$f203 = function (v) { // => { keyword: 'var'; type: 'into'; expr: var_decl_list; } return { keyword: 'var', @@ -2306,7 +3379,7 @@ function peg$parse(input, options) { expr: v, }; }; - var peg$f119 = function (k, f) { + var peg$f204 = function (k, f) { // => { keyword: 'var'; type: 'into'; expr: literal_string | ident; } return { keyword: k, @@ -2314,29 +3387,29 @@ function peg$parse(input, options) { expr: f, }; }; - var peg$f120 = function (l) { + var peg$f205 = function (l) { /*=>table_ref_list*/ return l; }; - var peg$f121 = function (head, tail) { + var peg$f206 = function (head, tail) { // => table_to_item[] return createList(head, tail); }; - var peg$f122 = function (head, tail) { + var peg$f207 = function (head, tail) { // => table_name[] return [head, tail]; }; - var peg$f123 = function (t) { + var peg$f208 = function (t) { // => { keyword: 'using'; type: 'btree' | 'hash' | 'gist' | 'gin' } return { keyword: 'using', type: t.toLowerCase(), }; }; - var peg$f124 = function (head, tail) { + var peg$f209 = function (head, tail) { // => index_option[] return createList(head, tail); }; - var peg$f125 = function (head, tail) { + var peg$f210 = function (head, tail) { // => index_option[] const result = [head]; for (let i = 0; i < tail.length; i++) { @@ -2344,7 +3417,7 @@ function peg$parse(input, options) { } return result; }; - var peg$f126 = function (k, e, kbs) { + var peg$f211 = function (k, e, kbs) { // => { type: 'key_block_size'; symbol: '='; expr: number; } return { type: k.toLowerCase(), @@ -2352,7 +3425,7 @@ function peg$parse(input, options) { expr: kbs, }; }; - var peg$f127 = function (k, e, kbs) { + var peg$f212 = function (k, e, kbs) { // => { type: ident_name; symbol: '='; expr: number | {type: 'origin'; value: ident; }; } return { type: k.toLowerCase(), @@ -2360,21 +3433,21 @@ function peg$parse(input, options) { expr: (typeof kbs === 'string' && { type: 'origin', value: kbs }) || kbs, }; }; - var peg$f128 = function (pn) { + var peg$f213 = function (pn) { // => { type: 'with parser'; expr: ident_name } return { type: 'with parser', expr: pn, }; }; - var peg$f129 = function (k) { + var peg$f214 = function (k) { // => { type: 'visible'; expr: 'visible' } | { type: 'invisible'; expr: 'invisible' } return { type: k.toLowerCase(), expr: k.toLowerCase(), }; }; - var peg$f130 = function (head, tail) { + var peg$f215 = function (head, tail) { // => [table_base, ...table_ref[]] tail.unshift(head); tail.forEach((tableInfo) => { @@ -2385,25 +3458,25 @@ function peg$parse(input, options) { }); return tail; }; - var peg$f131 = function (t) { + var peg$f216 = function (t) { /* => table_base */ return t; }; - var peg$f132 = function (t) { + var peg$f217 = function (t) { /* => table_join */ return t; }; - var peg$f133 = function (op, t, head, tail) { + var peg$f218 = function (op, t, head, tail) { // => table_base & {join: join_op; using: ident_name[]; } t.join = op; t.using = createList(head, tail); return t; }; - var peg$f134 = function (op, t, expr) { + var peg$f219 = function (op, t, expr) { // => table_base & {join: join_op; on?: on_clause; } t.join = op; t.on = expr; return t; }; - var peg$f135 = function (op, stmt, alias, expr) { + var peg$f220 = function (op, stmt, alias, expr) { /* => { expr: (union_stmt || table_ref_list) & { parentheses: true; }; as?: alias_clause; @@ -2419,20 +3492,20 @@ function peg$parse(input, options) { on: expr, }; }; - var peg$f136 = function () { + var peg$f221 = function () { // => { type: 'dual' } return { type: 'dual', }; }; - var peg$f137 = function (stmt, alias) { + var peg$f222 = function (stmt, alias) { // => { expr: value_clause; as?: alias_clause; } return { expr: { type: 'values', values: stmt }, as: alias, }; }; - var peg$f138 = function (l, stmt, alias) { + var peg$f223 = function (l, stmt, alias) { // => { prefix?: string; expr: union_stmt | value_clause; as?: alias_clause; } if (Array.isArray(stmt)) stmt = { type: 'values', values: stmt }; stmt.parentheses = true; @@ -2442,7 +3515,7 @@ function peg$parse(input, options) { as: alias, }; }; - var peg$f139 = function (l, stmt, alias) { + var peg$f224 = function (l, stmt, alias) { // => { prefix?: string; expr: table_ref_list; as?: alias_clause; } stmt = { type: 'tables', expr: stmt, parentheses: true }; return { @@ -2451,11 +3524,11 @@ function peg$parse(input, options) { as: alias, }; }; - var peg$f140 = function (l, e, alias) { + var peg$f225 = function (l, e, alias) { // => { prefix?: string; type: 'expr'; expr: expr; as?: alias_clause; } return { prefix: l, type: 'expr', expr: e, as: alias }; }; - var peg$f141 = function (t, f, re, alias) { + var peg$f226 = function (t, f, re, alias) { // => table_name & { expr: expr, repeatable: literal_numeric; as?: alias_clause;} return { ...t, @@ -2466,7 +3539,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f142 = function (t, alias) { + var peg$f227 = function (t, alias) { // => table_name & { as?: alias_clause; } if (t.type === 'var') { t.as = alias; @@ -2478,71 +3551,59 @@ function peg$parse(input, options) { }; } }; - var peg$f143 = function () { + var peg$f228 = function () { /* => 'LEFT JOIN' */ return 'LEFT JOIN'; }; - var peg$f144 = function () { + var peg$f229 = function () { /* => 'RIGHT JOIN' */ return 'RIGHT JOIN'; }; - var peg$f145 = function () { + var peg$f230 = function () { /* => 'FULL JOIN' */ return 'FULL JOIN'; }; - var peg$f146 = function () { + var peg$f231 = function () { /* => 'CROSS JOIN' */ return 'CROSS JOIN'; }; - var peg$f147 = function () { + var peg$f232 = function () { /* => 'INNER JOIN' */ return 'INNER JOIN'; }; - var peg$f148 = function (dt, schema, tail) { + var peg$f233 = function (dt, schema, tail) { // => { db?: ident; schema?: ident, table: ident | '*'; } const obj = { db: null, table: dt }; if (tail !== null) { obj.db = dt; obj.schema = schema[3]; obj.table = tail[3]; + return obj; } - return obj; - }; - var peg$f149 = function (dt) { - // => IGNORE - tableList.add(`select::${dt}::(.*)`); - return { - db: dt, - table: '*', - }; - }; - var peg$f150 = function (dt, tail) { - // => IGNORE - const obj = { db: null, table: dt }; - if (tail !== null) { + if (schema !== null) { obj.db = dt; - obj.table = tail[3]; + obj.table = schema[3]; } return obj; }; - var peg$f151 = function (v) { + var peg$f234 = function (v) { // => IGNORE v.db = null; v.table = v.name; return v; }; - var peg$f152 = function (e) { + var peg$f235 = function (e) { /* => or_and_where_expr */ return e; }; - var peg$f153 = function (e) { + var peg$f236 = function (e) { /* => binary_expr */ return e; }; - var peg$f154 = function (e) { + var peg$f237 = function (e) { /* => expr_list['value'] */ return e.value; }; - var peg$f155 = function (head, tail) { + var peg$f238 = function (head, tail) { // => column_ref[] return createList(head, tail); }; - var peg$f156 = function (e) { + var peg$f239 = function (e) { /* => expr */ return e; }; - var peg$f157 = function (l) { + var peg$f240 = function (l) { // => { keyword: 'window'; type: 'window', expr: named_window_expr_list; } return { keyword: 'window', @@ -2550,25 +3611,25 @@ function peg$parse(input, options) { expr: l, }; }; - var peg$f158 = function (head, tail) { + var peg$f241 = function (head, tail) { // => named_window_expr[] return createList(head, tail); }; - var peg$f159 = function (nw, anw) { + var peg$f242 = function (nw, anw) { // => { name: ident_name; as_window_specification: as_window_specification; } return { name: nw, as_window_specification: anw, }; }; - var peg$f160 = function (ws) { + var peg$f243 = function (ws) { // => { window_specification: window_specification; parentheses: boolean } return { window_specification: ws || {}, parentheses: true, }; }; - var peg$f161 = function (bc, l, w) { + var peg$f244 = function (bc, l, w) { // => { name: null; partitionby: partition_by_clause; orderby: order_by_clause; window_frame_clause: string | null; } return { name: null, @@ -2577,7 +3638,7 @@ function peg$parse(input, options) { window_frame_clause: w, }; }; - var peg$f162 = function (bc, l) { + var peg$f245 = function (bc, l) { // => { name: null; partitionby: partition_by_clause; orderby: order_by_clause; window_frame_clause: null } return { name: null, @@ -2586,50 +3647,49 @@ function peg$parse(input, options) { window_frame_clause: null, }; }; - var peg$f163 = function (kw, s) { + var peg$f246 = function (kw, s) { // => string return `rows ${s.value}`; }; - var peg$f164 = function (p, f) { + var peg$f247 = function (p, f) { // => string return `rows between ${p.value} and ${f.value}`; }; - var peg$f165 = function (s) { + var peg$f248 = function (s) { // => string s.value += ' FOLLOWING'; return s; }; - var peg$f166 = function (s) { + var peg$f249 = function (s) { // => string s.value += ' PRECEDING'; return s; }; - var peg$f167 = function () { + var peg$f250 = function () { // => { type: 'single_quote_string'; value: string } return { type: 'single_quote_string', value: 'current row' }; }; - var peg$f168 = function (s) { + var peg$f251 = function (s) { // => literal_string return { type: 'single_quote_string', value: s.toUpperCase() }; }; - var peg$f169 = function (bc) { + var peg$f252 = function (bc) { /* => column_clause */ return bc; }; - var peg$f170 = function (l) { + var peg$f253 = function (l) { /* => order_by_list */ return l; }; - var peg$f171 = function (head, tail) { + var peg$f254 = function (head, tail) { // => order_by_element[] return createList(head, tail); }; - var peg$f172 = function (e, d, nl) { - // => { expr: expr; type: 'ASC' | 'DESC'; nulls: 'NULLS FIRST' | 'NULLS LAST' | undefined } - const obj = { expr: e, type: 'ASC' }; - if (d === 'DESC') obj.type = 'DESC'; - obj.nulls = nl && `${nl[0]} ${nl[2] ? nl[2] : obj.type === 'ASC' ? 'LAST' : 'FIRST'}`; + var peg$f255 = function (e, d, nl) { + // => { expr: expr; type: 'ASC' | 'DESC' | undefined; nulls: 'NULLS FIRST' | 'NULLS LAST' | undefined } + const obj = { expr: e, type: d }; + obj.nulls = nl && [nl[0], nl[2]].filter((v) => v).join(' '); return obj; }; - var peg$f173 = function (l, tail) { + var peg$f256 = function (l, tail) { // => { separator: 'offset' | ''; value: [number_or_param | { type: 'origin', value: 'all' }, number_or_param?] } const res = []; if (l) res.push(typeof l[2] === 'string' ? { type: 'origin', value: 'all' } : l[2]); @@ -2639,7 +3699,7 @@ function peg$parse(input, options) { value: res, }; }; - var peg$f174 = function (cte, t, l, f, w, r) { + var peg$f257 = function (cte, t, l, f, w, r) { /* export interface update_stmt_node { with?: with_clause; type: 'update'; @@ -2682,7 +3742,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f175 = function (t, f, w) { + var peg$f258 = function (t, f, w) { /* export interface table_ref_addition extends table_name { addition: true; @@ -2724,39 +3784,78 @@ function peg$parse(input, options) { }, }; }; - var peg$f176 = function (head, tail) { + var peg$f259 = function (head, tail) { // => set_item[] return createList(head, tail); }; - var peg$f177 = function (tbl, c, v) { + var peg$f260 = function (tbl, c, v) { // => { column: ident; value: additive_expr; table?: ident;} return { column: c, value: v, table: tbl && tbl[0] }; }; - var peg$f178 = function (tbl, c, v) { + var peg$f261 = function (tbl, c, v) { // => { column: ident; value: column_ref; table?: ident; keyword: 'values' } return { column: c, value: v, table: tbl && tbl[0], keyword: 'values' }; }; - var peg$f179 = function (k, c) { + var peg$f262 = function (k, c) { // => { type: 'returning'; columns: column_clause | select_stmt; } return { type: (k && k.toLowerCase()) || 'returning', columns: (c === '*' && [{ type: 'expr', expr: { type: 'column_ref', table: null, column: '*' }, as: null }]) || c, }; }; - var peg$f180 = function (head, tail) { + var peg$f263 = function (head, tail) { // => ident_name[] return createList(head, tail); }; - var peg$f181 = function (v) { + var peg$f264 = function (v) { // => value_item return v; }; - var peg$f182 = function (ri, t, p, c, v, r) { + var peg$f265 = function (c) { + // => { type: 'column'; expr: column_ref_list; parentheses: true; } + return { + type: 'column', + expr: c, + parentheses: true, + }; + }; + var peg$f266 = function () { + // => { keyword: "do"; expr: {type: 'origin'; value: string; }; } + return { + keyword: 'do', + expr: { + type: 'origin', + value: 'nothing', + }, + }; + }; + var peg$f267 = function (s, w) { + // => { keyword: "do"; expr: {type: 'update'; set: set_list; where: where_clause; }; } + return { + keyword: 'do', + expr: { + type: 'update', + set: s, + where: w, + }, + }; + }; + var peg$f268 = function (ct, ca) { + // => { type: "conflict"; keyword: "on"; target: conflict_target; action: conflict_action; } + return { + type: 'conflict', + keyword: 'on', + target: ct, + action: ca, + }; + }; + var peg$f269 = function (ri, t, p, c, v, oc, r) { /* export interface replace_insert_stmt_node { type: 'insert' | 'replace'; table?: [table_name]; columns: column_list; + conflict?: on_clifict; values: insert_value_clause; partition?: insert_partition; returning?: returning_stmt; @@ -2787,11 +3886,12 @@ function peg$parse(input, options) { columns: c, values: v, partition: p, + conflict: oc, returning: r, }, }; }; - var peg$f183 = function (ri, ig, it, t, p, v, r) { + var peg$f270 = function (ri, ig, it, t, p, v, r) { // => AstStatement if (t) { tableList.add(`insert::${t.db}::${t.table}`); @@ -2816,30 +3916,30 @@ function peg$parse(input, options) { }, }; }; - var peg$f184 = function () { + var peg$f271 = function () { /* => 'insert' */ return 'insert'; }; - var peg$f185 = function () { + var peg$f272 = function () { /* => 'replace' */ return 'replace'; }; - var peg$f186 = function (l) { + var peg$f273 = function (l) { /* => value_list */ return l; }; - var peg$f187 = function (head, tail) { + var peg$f274 = function (head, tail) { // => value_item[] return createList(head, tail); }; - var peg$f188 = function (l) { + var peg$f275 = function (l) { // => expr_list return l; }; - var peg$f189 = function (head, tail) { - // => { type: 'expr_list'; value: expr_item[] } + var peg$f276 = function (head, tail) { + // => { type: 'expr_list'; value: expr[] } const el = { type: 'expr_list' }; el.value = createList(head, tail); return el; }; - var peg$f190 = function (e, u) { + var peg$f277 = function (e, u) { // => { type: 'interval', expr: expr; unit: interval_unit; } return { type: 'interval', @@ -2847,7 +3947,7 @@ function peg$parse(input, options) { unit: u.toLowerCase(), }; }; - var peg$f191 = function (e) { + var peg$f278 = function (e) { // => { type: 'interval', expr: expr; unit: interval_unit; } return { type: 'interval', @@ -2855,7 +3955,7 @@ function peg$parse(input, options) { unit: '', }; }; - var peg$f192 = function (condition_list, otherwise) { + var peg$f279 = function (condition_list, otherwise) { /* => { type: 'case'; expr: null; @@ -2869,7 +3969,7 @@ function peg$parse(input, options) { args: condition_list, }; }; - var peg$f193 = function (expr, condition_list, otherwise) { + var peg$f280 = function (expr, condition_list, otherwise) { /* => { type: 'case'; expr: expr; @@ -2883,11 +3983,11 @@ function peg$parse(input, options) { args: condition_list, }; }; - var peg$f194 = function (head, tail) { + var peg$f281 = function (head, tail) { // => case_when_then[] return createList(head, tail, 1); }; - var peg$f195 = function (condition, result) { + var peg$f282 = function (condition, result) { // => { type: 'when'; cond: binary_expr; result: expr; } return { type: 'when', @@ -2895,11 +3995,11 @@ function peg$parse(input, options) { result: result, }; }; - var peg$f196 = function (result) { + var peg$f283 = function (result) { // => { type: 'else'; condition?: never; result: expr; } return { type: 'else', result: result }; }; - var peg$f197 = function (head, tail, rh) { + var peg$f284 = function (head, tail, rh) { /* export type BINARY_OPERATORS = LOGIC_OPERATOR | 'OR' | 'AND' | multiplicative_operator | additive_operator | arithmetic_comparison_operator @@ -2921,7 +4021,7 @@ function peg$parse(input, options) { else if (rh.type === 'arithmetic') return createBinaryExprChain(logicExpr, rh.tail); else return createBinaryExpr(rh.op, logicExpr, rh.right); }; - var peg$f198 = function (op, tail) { + var peg$f285 = function (op, tail) { /* export type UNARY_OPERATORS = '+' | '-' | 'EXISTS' | 'NOT EXISTS' | 'NULL' => { @@ -2932,7 +4032,17 @@ function peg$parse(input, options) { } */ return createUnaryExpr(op, tail[0][1]); }; - var peg$f199 = function (head, tail) { + var peg$f286 = function (head, tail) { + const ast = head.ast; + if (ast && ast.type === 'select') { + if ( + !(head.parentheses_symbol || head.parentheses || head.ast.parentheses || head.ast.parentheses_symbol) || + ast.columns.length !== 1 || + ast.columns[0].expr.column === '*' + ) + throw new Error('invalid column clause with select statement'); + } + if (!tail || tail.length === 0) return head; // => binary_expr const len = tail.length; let result = tail[len - 1][3]; @@ -2942,7 +4052,7 @@ function peg$parse(input, options) { } return result; }; - var peg$f200 = function (head, tail) { + var peg$f287 = function (head, tail) { // => binary_expr | { type: 'expr_list'; value: expr[] } const len = tail.length; let result = head; @@ -2963,41 +4073,41 @@ function peg$parse(input, options) { } return result; }; - var peg$f201 = function (head, tail) { + var peg$f288 = function (head, tail) { // => binary_expr return createBinaryExprChain(head, tail); }; - var peg$f202 = function (head, tail) { + var peg$f289 = function (head, tail) { // => binary_expr return createBinaryExprChain(head, tail); }; - var peg$f203 = function (expr) { + var peg$f290 = function (expr) { // => unary_expr return createUnaryExpr('NOT', expr); }; - var peg$f204 = function (left, rh) { + var peg$f291 = function (left, rh) { // => binary_expr if (rh === null) return left; else if (rh.type === 'arithmetic') return createBinaryExprChain(left, rh.tail); else return createBinaryExpr(rh.op, left, rh.right); }; - var peg$f205 = function (op, stmt) { + var peg$f292 = function (op, stmt) { // => unary_expr stmt.parentheses = true; return createUnaryExpr(op, stmt); }; - var peg$f206 = function (nk) { + var peg$f293 = function (nk) { /* => 'NOT EXISTS' */ return nk[0] + ' ' + nk[2]; }; - var peg$f207 = function (l) { + var peg$f294 = function (l) { // => { type: 'arithmetic'; tail: any } return { type: 'arithmetic', tail: l }; }; - var peg$f208 = function (right) { + var peg$f295 = function (right) { // => { op: 'IS'; right: additive_expr; } return { op: 'IS', right: right }; }; - var peg$f209 = function (right) { + var peg$f296 = function (right) { // => { type: 'origin'; value: string; } const { db, table } = right.pop(); const tableName = table === '*' ? '*' : `"${table}"`; @@ -3010,11 +4120,11 @@ function peg$parse(input, options) { }, }; }; - var peg$f210 = function (right) { + var peg$f297 = function (right) { // => { type: 'IS NOT'; right: additive_expr; } return { op: 'IS NOT', right: right }; }; - var peg$f211 = function (op, begin, end) { + var peg$f298 = function (op, begin, end) { // => { op: 'BETWEEN' | 'NOT BETWEEN'; right: { type: 'expr_list'; value: [expr, expr] } } return { op: op, @@ -3024,83 +4134,87 @@ function peg$parse(input, options) { }, }; }; - var peg$f212 = function (nk) { + var peg$f299 = function (nk) { /* => 'NOT BETWEEN' */ return nk[0] + ' ' + nk[2]; }; - var peg$f213 = function (nk) { + var peg$f300 = function (nk) { /* => 'LIKE' */ return nk[0] + ' ' + nk[2]; }; - var peg$f214 = function () { + var peg$f301 = function () { // => 'SIMILAR TO' return 'SIMILAR TO'; }; - var peg$f215 = function () { + var peg$f302 = function () { // => 'NOT SIMILAR TO' return 'NOT SIMILAR TO'; }; - var peg$f216 = function (kw, c) { + var peg$f303 = function (op, right) { + // => { op: regex_op; right: literal | comparison_expr} + return { op: op, right: right }; + }; + var peg$f304 = function (kw, c) { // => { type: 'ESCAPE'; value: literal_string } return { type: 'ESCAPE', value: c, }; }; - var peg$f217 = function (nk) { + var peg$f305 = function (nk) { /* => 'NOT IN' */ return nk[0] + ' ' + nk[2]; }; - var peg$f218 = function (op, right, es) { + var peg$f306 = function (op, right, es) { // => { op: like_op; right: (literal | comparison_expr) & { escape?: escape_op }; } if (es) right.escape = es; return { op: op, right: right }; }; - var peg$f219 = function (op, l) { + var peg$f307 = function (op, l) { // => {op: in_op; right: expr_list | var_decl | literal_string; } return { op: op, right: l }; }; - var peg$f220 = function (op, e) { + var peg$f308 = function (op, e) { // => IGNORE return { op: op, right: e }; }; - var peg$f221 = function (s, c) { + var peg$f309 = function (s, c) { // => { op: string; right: expr } return { op: s, right: (c && c.expr) || c, }; }; - var peg$f222 = function (head, tail) { + var peg$f310 = function (head, tail) { // => binary_expr return createBinaryExprChain(head, tail); }; - var peg$f223 = function (head, tail) { + var peg$f311 = function (head, tail) { // => binary_expr return createBinaryExprChain(head, tail); }; - var peg$f224 = function (c, a) { + var peg$f312 = function (c, a) { // => column_ref - c.array_index = a; + if (a) c.array_index = a; return c; }; - var peg$f225 = function (list) { + var peg$f313 = function (list) { // => or_and_where_expr list.parentheses = true; return list; }; - var peg$f226 = function (p, n) { + var peg$f314 = function (p, n) { // => { type: 'origin'; value: string; } return { type: 'origin', value: `$<${n.value}>`, }; }; - var peg$f227 = function (n) { + var peg$f315 = function (n) { // => { type: 'origin'; value: string; } return { type: 'origin', value: `E'${n.join('')}'`, }; }; - var peg$f228 = function (tbl) { + var peg$f316 = function (tbl) { // => IGNORE const table = (tbl && tbl[0]) || null; columnList.add(`select::${table}::(.*)`); @@ -3110,7 +4224,7 @@ function peg$parse(input, options) { column: '*', }; }; - var peg$f229 = function (tbl, col, a) { + var peg$f317 = function (tbl, col, a) { // => IGNORE const tableName = (tbl && tbl[0]) || null; columnList.add(`select::${tableName}::${col}`); @@ -3122,7 +4236,7 @@ function peg$parse(input, options) { properties: a.map((item) => item[2]), }; }; - var peg$f230 = function (schema, tbl, col) { + var peg$f318 = function (schema, tbl, col) { /* => { type: 'column_ref'; schema: string; @@ -3139,7 +4253,7 @@ function peg$parse(input, options) { column: col[3], }; }; - var peg$f231 = function (tbl, col) { + var peg$f319 = function (tbl, col) { /* => { type: 'column_ref'; table: ident; @@ -3154,7 +4268,7 @@ function peg$parse(input, options) { column: col, }; }; - var peg$f232 = function (col) { + var peg$f320 = function (col) { // => IGNORE columnList.add(`select::null::${col}`); return { @@ -3163,66 +4277,64 @@ function peg$parse(input, options) { column: col, }; }; - var peg$f233 = function (head, tail) { + var peg$f321 = function (head, tail) { // => column[] return createList(head, tail); }; - var peg$f234 = function (name) { + var peg$f322 = function (name) { return reservedMap[name.toUpperCase()] === true; }; - var peg$f235 = function (name) { + var peg$f323 = function (name) { // => ident_name return name; }; - var peg$f236 = function (name) { + var peg$f324 = function (name) { // => indent_name return name; }; - var peg$f237 = function (name) { + var peg$f325 = function (head, tail) { + // => ident[] + return createList(head, tail); + }; + var peg$f326 = function (name) { return reservedMap[name.toUpperCase()] === true; }; - var peg$f238 = function (name, c) { + var peg$f327 = function (name, c) { // => string - return `${name}(${c.join(', ')})`; + if (!c) return name; + return `${name}(${c[3].join(', ')})`; }; - var peg$f239 = function (name) { - return reservedMap[name.toUpperCase()] === true; - }; - var peg$f240 = function (name) { - // => string - return name; - }; - var peg$f241 = function (name) { + var peg$f328 = function (name) { // => IGNORE return name; }; - var peg$f242 = function (chars) { + var peg$f329 = function (chars) { /* => string */ return chars.join(''); }; - var peg$f243 = function (chars) { + var peg$f330 = function (chars) { /* => string */ return chars.join(''); }; - var peg$f244 = function (chars) { + var peg$f331 = function (chars) { /* => string */ return chars.join(''); }; - var peg$f245 = function (name) { + var peg$f332 = function (name) { return reservedMap[name.toUpperCase()] === true; }; - var peg$f246 = function (name) { + var peg$f333 = function (name) { /* => string */ return name; }; - var peg$f247 = function (start, parts) { + var peg$f334 = function (start, parts) { /* => string */ return start + parts.join(''); }; - var peg$f248 = function (start, parts) { + var peg$f335 = function (start, parts) { // => string return start + parts.join(''); }; - var peg$f249 = function (l) { + var peg$f336 = function (l) { // => { type: 'param'; value: ident_name } return { type: 'param', value: l[1] }; }; - var peg$f250 = function (kw, l) { + var peg$f337 = function (kw, l) { // => { type: 'on update'; keyword: string; parentheses: boolean; expr: expr } return { type: 'on update', @@ -3231,28 +4343,28 @@ function peg$parse(input, options) { expr: l, }; }; - var peg$f251 = function (kw) { + var peg$f338 = function (kw) { // => { type: 'on update'; keyword: string; } return { type: 'on update', keyword: kw, }; }; - var peg$f252 = function (aws) { + var peg$f339 = function (aws) { // => { type: 'windows'; as_window_specification: as_window_specification } return { type: 'window', as_window_specification: aws, }; }; - var peg$f253 = function (bc, l) { + var peg$f340 = function (bc, l) { // => { partitionby: partition_by_clause; orderby: order_by_clause } return { partitionby: bc, orderby: l, }; }; - var peg$f254 = function (wc) { + var peg$f341 = function (wc) { // => { keyword: 'filter'; parentheses: true, where: where_clause } return { keyword: 'filter', @@ -3260,12 +4372,12 @@ function peg$parse(input, options) { where: wc, }; }; - var peg$f255 = function (e, f) { + var peg$f342 = function (e, f) { // => { type: 'aggr_func'; name: string; args: { expr: additive_expr } | count_arg; over: over_partition; filter?: aggr_filter; } if (f) e.filter = f; return e; }; - var peg$f256 = function (name, over) { + var peg$f343 = function (name, over) { // => { type: 'window_func'; name: string; over: over_partition } return { type: 'window_func', @@ -3273,7 +4385,7 @@ function peg$parse(input, options) { over: over, }; }; - var peg$f257 = function (name, l, cn, over) { + var peg$f344 = function (name, l, cn, over) { // => { type: 'window_func'; name: string; args: expr_list; consider_nulls: null | string; over: over_partition } return { type: 'window_func', @@ -3283,7 +4395,7 @@ function peg$parse(input, options) { consider_nulls: cn, }; }; - var peg$f258 = function (name, l, cn, over) { + var peg$f345 = function (name, l, cn, over) { // => window_fun_laglead return { type: 'window_func', @@ -3296,11 +4408,11 @@ function peg$parse(input, options) { consider_nulls: cn, }; }; - var peg$f259 = function (v) { + var peg$f346 = function (v) { // => string return v.toUpperCase() + ' NULLS'; }; - var peg$f260 = function (name, e, bc) { + var peg$f347 = function (name, e, bc) { // => { type: 'aggr_func'; name: 'SUM' | 'MAX' | 'MIN' | 'AVG'; args: { expr: additive_expr }; over: over_partition } return { type: 'aggr_func', @@ -3311,7 +4423,7 @@ function peg$parse(input, options) { over: bc, }; }; - var peg$f261 = function (name, arg, bc) { + var peg$f348 = function (name, arg, bc) { // => { type: 'aggr_func'; name: 'COUNT' | 'GROUP_CONCAT'; args:count_arg; over: over_partition } return { type: 'aggr_func', @@ -3320,7 +4432,7 @@ function peg$parse(input, options) { over: bc, }; }; - var peg$f262 = function (name, arg, or, bc) { + var peg$f349 = function (name, arg, or, bc) { // => { type: 'aggr_func'; name: 'PERCENTILE_CONT' | 'PERCENTILE_DISC'; args: literal_numeric / literal_array; within_group_orderby: order_by_clause; over?: over_partition } return { type: 'aggr_func', @@ -3332,7 +4444,7 @@ function peg$parse(input, options) { over: bc, }; }; - var peg$f263 = function (name, or, bc) { + var peg$f350 = function (name, or, bc) { // => { type: 'aggr_func'; name: 'MODE'; args: literal_numeric / literal_array; within_group_orderby: order_by_clause; over?: over_partition } return { type: 'aggr_func', @@ -3342,14 +4454,14 @@ function peg$parse(input, options) { over: bc, }; }; - var peg$f264 = function (kw, s) { + var peg$f351 = function (kw, s) { // => { keyword: string | null; value: literal_string; } return { keyword: kw, value: s, }; }; - var peg$f265 = function (d, c, or, s) { + var peg$f352 = function (d, c, or, s) { /* => { distinct: 'DISTINCT'; expr: expr; orderby?: order_by_clause; parentheses: boolean; separator?: concat_separator; } */ return { distinct: d, expr: c, @@ -3358,7 +4470,7 @@ function peg$parse(input, options) { separator: s, }; }; - var peg$f266 = function (d, c, or, s) { + var peg$f353 = function (d, c, or, s) { /* => { distinct: 'DISTINCT'; expr: expr; orderby?: order_by_clause; parentheses: boolean; separator?: concat_separator; } */ return { distinct: d, expr: c, @@ -3367,10 +4479,10 @@ function peg$parse(input, options) { separator: s, }; }; - var peg$f267 = function (e) { + var peg$f354 = function (e) { /* => { expr: star_expr } */ return { expr: e }; }; - var peg$f268 = function (pre, name, arg, o) { + var peg$f355 = function (pre, name, arg, o) { // => { type: 'aggr_func'; args:count_arg; name: 'ARRAY_AGG'; orderby?: order_by_clause } return { type: 'aggr_func', @@ -3379,10 +4491,10 @@ function peg$parse(input, options) { orderby: o, }; }; - var peg$f269 = function () { + var peg$f356 = function () { /* => { type: 'star'; value: '*' } */ return { type: 'star', value: '*' }; }; - var peg$f270 = function (p, rm, k) { + var peg$f357 = function (p, rm, k) { // => expr_list let value = []; if (p) value.push({ type: 'origin', value: p }); @@ -3393,7 +4505,7 @@ function peg$parse(input, options) { value, }; }; - var peg$f271 = function (tr, s) { + var peg$f358 = function (tr, s) { // => { type: 'function'; name: string; args: expr_list; } let args = tr || { type: 'expr_list', value: [] }; args.value.push(s); @@ -3403,7 +4515,7 @@ function peg$parse(input, options) { args, }; }; - var peg$f272 = function (name, l, z) { + var peg$f359 = function (name, l, z) { // => { type: 'function'; name: string; args: expr_list; suffix: literal_string; } z.prefix = 'at time zone'; return { @@ -3413,7 +4525,7 @@ function peg$parse(input, options) { suffix: z, }; }; - var peg$f273 = function (name, l, bc) { + var peg$f360 = function (name, l, bc) { // => { type: 'function'; name: string; args: expr_list; over?: over_partition; } return { type: 'function', @@ -3422,7 +4534,15 @@ function peg$parse(input, options) { over: bc, }; }; - var peg$f274 = function (name, l) { + var peg$f361 = function (f, up) { + // => { type: 'function'; name: string; over?: on_update_current_timestamp; } + return { + type: 'function', + name: f, + over: up, + }; + }; + var peg$f362 = function (name, l) { // => { type: 'function'; name: string; args: expr_list; } if (l && l.type !== 'expr_list') l = { type: 'expr_list', value: [l] }; return { @@ -3431,19 +4551,11 @@ function peg$parse(input, options) { args: l ? l : { type: 'expr_list', value: [] }, }; }; - var peg$f275 = function (f, up) { - // => { type: 'function'; name: string; over?: on_update_current_timestamp; } - return { - type: 'function', - name: f, - over: up, - }; - }; - var peg$f276 = function (f) { + var peg$f363 = function (f) { // => 'string' return f; }; - var peg$f277 = function (kw, f, t, s) { + var peg$f364 = function (kw, f, t, s) { // => { type: 'extract'; args: { field: extract_filed; cast_type: 'TIMESTAMP' | 'INTERVAL' | 'TIME'; source: expr; }} return { type: kw.toLowerCase(), @@ -3454,7 +4566,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f278 = function (kw, f, s) { + var peg$f365 = function (kw, f, s) { // => { type: 'extract'; args: { field: extract_filed; source: expr; }} return { type: kw.toLowerCase(), @@ -3464,48 +4576,24 @@ function peg$parse(input, options) { }, }; }; - var peg$f279 = function (e, s, t, alias) { + var peg$f366 = function (s, t, a, alias) { /* => { as?: alias_clause, - type: 'cast'; - expr: literal | aggr_func | func_call | case_expr | interval_expr | column_ref | param - | expr; symbol: '::' | 'as', - keyword: 'cast'; - target: data_type; - } - */ - e.parentheses = true; - return { - as: alias, - type: 'cast', - keyword: 'cast', - expr: e, - symbol: '::', - target: t, - }; - }; - var peg$f280 = function (e, s, t, alias) { - /* => { - as?: alias_clause, - type: 'cast'; - expr: literal | aggr_func | func_call | case_expr | interval_expr | column_ref | param - | expr; - symbol: '::' | 'as', - keyword: 'cast'; target: data_type; + arrows?: ('->>' | '->')[]; + property?: (literal_string | literal_numeric)[]; } */ return { as: alias, - type: 'cast', - keyword: 'cast', - expr: e, symbol: '::', target: t, + arrows: a.map((item) => item[0]), + properties: a.map((item) => item[2]), }; }; - var peg$f281 = function (c, e, t) { + var peg$f367 = function (c, e, t, a) { // => IGNORE return { type: 'cast', @@ -3513,9 +4601,11 @@ function peg$parse(input, options) { expr: e, symbol: 'as', target: t, + arrows: a.map((item) => item[0]), + properties: a.map((item) => item[2]), }; }; - var peg$f282 = function (c, e, precision) { + var peg$f368 = function (c, e, precision) { // => IGNORE return { type: 'cast', @@ -3527,7 +4617,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f283 = function (c, e, precision, scale) { + var peg$f369 = function (c, e, precision, scale) { // => IGNORE return { type: 'cast', @@ -3539,7 +4629,7 @@ function peg$parse(input, options) { }, }; }; - var peg$f284 = function (c, e, s, t) { + var peg$f370 = function (c, e, s, t) { /* MySQL cast to un-/signed integer */ // => IGNORE return { @@ -3552,7 +4642,42 @@ function peg$parse(input, options) { }, }; }; - var peg$f285 = function (s, c) { + var peg$f371 = function (e, c) { + /* => { + type: 'cast'; + expr: literal | aggr_func | func_call | case_expr | interval_expr | column_ref | param + | expr; + keyword: 'cast'; + ...cast_double_colon; + } + */ + e.parentheses = true; + if (!c) return e; + return { + type: 'cast', + keyword: 'cast', + expr: e, + ...c, + }; + }; + var peg$f372 = function (e, c) { + /* => { + type: 'cast'; + expr: literal | aggr_func | func_call | case_expr | interval_expr | column_ref | param + | expr; + keyword: 'cast'; + ...cast_double_colon; + } + */ + if (!c) return e; + return { + type: 'cast', + keyword: 'cast', + expr: e, + ...c, + }; + }; + var peg$f373 = function (s, c) { /* => { expr_list: expr_list | {type: 'origin', value: ident }, @@ -3568,113 +4693,113 @@ function peg$parse(input, options) { brackets: true, }; }; - var peg$f286 = function (head, tail) { + var peg$f374 = function (head, tail) { // => literal[] return createList(head, tail); }; - var peg$f287 = function () { + var peg$f375 = function () { // => { type: 'null'; value: null } return { type: 'null', value: null }; }; - var peg$f288 = function () { + var peg$f376 = function () { // => { type: 'not null'; value: 'not null' } return { type: 'not null', value: 'not null', }; }; - var peg$f289 = function () { + var peg$f377 = function () { // => { type: 'bool', value: true } return { type: 'bool', value: true }; }; - var peg$f290 = function () { + var peg$f378 = function () { //=> { type: 'bool', value: false } return { type: 'bool', value: false }; }; - var peg$f291 = function (ca, fs) { + var peg$f379 = function (ca, fs) { // => { type: 'single_quote_string'; value: string; } return { type: 'single_quote_string', value: `${ca[1].join('')}${fs[1].join('')}`, }; }; - var peg$f292 = function (ca) { + var peg$f380 = function (ca) { // => { type: 'single_quote_string'; value: string; } return { type: 'single_quote_string', value: ca[1].join(''), }; }; - var peg$f293 = function (ca) { + var peg$f381 = function (ca) { // => { type: 'string'; value: string; } return { type: 'double_quote_string', value: ca[1].join(''), }; }; - var peg$f294 = function (type, ca) { + var peg$f382 = function (type, ca) { // => { type: 'TIME' | 'DATE' | 'TIMESTAMP' | 'DATETIME', value: string } return { type: type.toLowerCase(), value: ca[1].join(''), }; }; - var peg$f295 = function (type, ca) { + var peg$f383 = function (type, ca) { // => { type: 'TIME' | 'DATE' | 'TIMESTAMP' | 'DATETIME', value: string } return { type: type.toLowerCase(), value: ca[1].join(''), }; }; - var peg$f296 = function () { + var peg$f384 = function () { return "\\'"; }; - var peg$f297 = function () { + var peg$f385 = function () { return '\\"'; }; - var peg$f298 = function () { + var peg$f386 = function () { return '\\\\'; }; - var peg$f299 = function () { + var peg$f387 = function () { return '\\/'; }; - var peg$f300 = function () { + var peg$f388 = function () { return '\b'; }; - var peg$f301 = function () { + var peg$f389 = function () { return '\f'; }; - var peg$f302 = function () { + var peg$f390 = function () { return '\n'; }; - var peg$f303 = function () { + var peg$f391 = function () { return '\r'; }; - var peg$f304 = function () { + var peg$f392 = function () { return '\t'; }; - var peg$f305 = function (h1, h2, h3, h4) { + var peg$f393 = function (h1, h2, h3, h4) { return String.fromCharCode(parseInt('0x' + h1 + h2 + h3 + h4)); }; - var peg$f306 = function () { + var peg$f394 = function () { return '\\'; }; - var peg$f307 = function () { + var peg$f395 = function () { return "''"; }; - var peg$f308 = function (n) { + var peg$f396 = function (n) { // => number | { type: 'bigint'; value: string; } if (n && n.type === 'bigint') return n; return { type: 'number', value: n }; }; - var peg$f309 = function (int_, frac, exp) { + var peg$f397 = function (int_, frac, exp) { const numStr = (int_ || '') + frac + exp; return { type: 'bigint', value: numStr, }; }; - var peg$f310 = function (int_, frac) { + var peg$f398 = function (int_, frac) { // => IGNORE const numStr = (int_ || '') + frac; if (int_ && isBigInt(int_)) @@ -3684,7 +4809,7 @@ function peg$parse(input, options) { }; return parseFloat(numStr); }; - var peg$f311 = function (int_, exp) { + var peg$f399 = function (int_, exp) { // => IGNORE const numStr = int_ + exp; return { @@ -3692,7 +4817,7 @@ function peg$parse(input, options) { value: numStr, }; }; - var peg$f312 = function (int_) { + var peg$f400 = function (int_) { // => IGNORE if (isBigInt(int_)) return { @@ -3701,373 +4826,385 @@ function peg$parse(input, options) { }; return parseFloat(int_); }; - var peg$f313 = function (op, digits) { + var peg$f401 = function (op, digits) { return op + digits; }; - var peg$f314 = function (op, digit) { + var peg$f402 = function (op, digit) { return op + digit; }; - var peg$f315 = function (digits) { + var peg$f403 = function (digits) { return '.' + digits; }; - var peg$f316 = function (e, digits) { + var peg$f404 = function (e, digits) { return e + digits; }; - var peg$f317 = function (digits) { + var peg$f405 = function (digits) { return digits.join(''); }; - var peg$f318 = function (e, sign) { + var peg$f406 = function (e, sign) { return e + (sign !== null ? sign : ''); }; - var peg$f319 = function () { + var peg$f407 = function () { return 'DROP'; }; - var peg$f320 = function () { + var peg$f408 = function () { return 'TEMPORARY'; }; - var peg$f321 = function () { + var peg$f409 = function () { return 'TEMP'; }; - var peg$f322 = function () { - return 'RETURNING'; - }; - var peg$f323 = function () { - return 'PARTITION'; - }; - var peg$f324 = function () { - return 'TABLE'; - }; - var peg$f325 = function () { - return 'DATABASE'; - }; - var peg$f326 = function () { - return 'SCHEME'; - }; - var peg$f327 = function () { - return 'SEQUENCE'; - }; - var peg$f328 = function () { - return 'TABLESPACE'; - }; - var peg$f329 = function () { - return 'COLLATE'; - }; - var peg$f330 = function () { - return 'DEALLOCATE'; - }; - var peg$f331 = function () { - return 'OFFSET'; - }; - var peg$f332 = function () { - return 'ASC'; - }; - var peg$f333 = function () { - return 'DESC'; - }; - var peg$f334 = function () { - return 'ALL'; - }; - var peg$f335 = function () { - return 'DISTINCT'; - }; - var peg$f336 = function () { - return 'BETWEEN'; - }; - var peg$f337 = function () { - return 'IN'; - }; - var peg$f338 = function () { - return 'IS'; - }; - var peg$f339 = function () { - return 'LIKE'; - }; - var peg$f340 = function () { - return 'ILIKE'; - }; - var peg$f341 = function () { - /* => 'EXISTS' */ return 'EXISTS'; - }; - var peg$f342 = function () { - return 'NOT'; - }; - var peg$f343 = function () { - return 'AND'; - }; - var peg$f344 = function () { - return 'OR'; - }; - var peg$f345 = function () { - return 'ARRAY'; - }; - var peg$f346 = function () { - return 'ARRAY_AGG'; - }; - var peg$f347 = function () { - return 'COUNT'; - }; - var peg$f348 = function () { - return 'GROUP_CONCAT'; - }; - var peg$f349 = function () { - return 'MAX'; - }; - var peg$f350 = function () { - return 'MIN'; - }; - var peg$f351 = function () { - return 'SUM'; - }; - var peg$f352 = function () { - return 'AVG'; - }; - var peg$f353 = function () { - return 'EXTRACT'; - }; - var peg$f354 = function () { - return 'CALL'; - }; - var peg$f355 = function () { - return 'CAST'; - }; - var peg$f356 = function () { - return 'BOOL'; - }; - var peg$f357 = function () { - return 'BOOLEAN'; - }; - var peg$f358 = function () { - return 'CHAR'; - }; - var peg$f359 = function () { - return 'CHARACTER'; - }; - var peg$f360 = function () { - return 'VARCHAR'; - }; - var peg$f361 = function () { - return 'NUMERIC'; - }; - var peg$f362 = function () { - return 'DECIMAL'; - }; - var peg$f363 = function () { - return 'SIGNED'; - }; - var peg$f364 = function () { - return 'UNSIGNED'; - }; - var peg$f365 = function () { - return 'INT'; - }; - var peg$f366 = function () { - return 'ZEROFILL'; - }; - var peg$f367 = function () { - return 'INTEGER'; - }; - var peg$f368 = function () { - return 'JSON'; - }; - var peg$f369 = function () { - return 'JSONB'; - }; - var peg$f370 = function () { - return 'GEOMETRY'; - }; - var peg$f371 = function () { - return 'SMALLINT'; - }; - var peg$f372 = function () { - return 'SERIAL'; - }; - var peg$f373 = function () { - return 'TINYINT'; - }; - var peg$f374 = function () { - return 'TINYTEXT'; - }; - var peg$f375 = function () { - return 'TEXT'; - }; - var peg$f376 = function () { - return 'MEDIUMTEXT'; - }; - var peg$f377 = function () { - return 'LONGTEXT'; - }; - var peg$f378 = function () { - return 'BIGINT'; - }; - var peg$f379 = function () { - return 'ENUM'; - }; - var peg$f380 = function () { - return 'FLOAT'; - }; - var peg$f381 = function () { - return 'DOUBLE'; - }; - var peg$f382 = function () { - return 'BIGSERIAL'; - }; - var peg$f383 = function () { - return 'REAL'; - }; - var peg$f384 = function () { - return 'DATE'; - }; - var peg$f385 = function () { - return 'DATETIME'; - }; - var peg$f386 = function () { - return 'ROWS'; - }; - var peg$f387 = function () { - return 'TIME'; - }; - var peg$f388 = function () { - return 'TIMESTAMP'; - }; - var peg$f389 = function () { - return 'TRUNCATE'; - }; - var peg$f390 = function () { - return 'USER'; - }; - var peg$f391 = function () { - return 'UUID'; - }; - var peg$f392 = function () { - return 'OID'; - }; - var peg$f393 = function () { - return 'REGCLASS'; - }; - var peg$f394 = function () { - return 'REGCOLLATION'; - }; - var peg$f395 = function () { - return 'REGCONFIG'; - }; - var peg$f396 = function () { - return 'REGDICTIONARY'; - }; - var peg$f397 = function () { - return 'REGNAMESPACE'; - }; - var peg$f398 = function () { - return 'REGOPER'; - }; - var peg$f399 = function () { - return 'REGOPERATOR'; - }; - var peg$f400 = function () { - return 'REGPROC'; - }; - var peg$f401 = function () { - return 'REGPROCEDURE'; - }; - var peg$f402 = function () { - return 'REGROLE'; - }; - var peg$f403 = function () { - return 'REGTYPE'; - }; - var peg$f404 = function () { - return 'CURRENT_DATE'; - }; - var peg$f405 = function () { - return 'ADDDATE'; - }; - var peg$f406 = function () { - return 'INTERVAL'; - }; - var peg$f407 = function () { - return 'YEAR'; - }; - var peg$f408 = function () { - return 'MONTH'; - }; - var peg$f409 = function () { - return 'DAY'; - }; var peg$f410 = function () { - return 'HOUR'; + return 'RECURSIVE'; }; var peg$f411 = function () { - return 'MINUTE'; + return 'RETURNING'; }; var peg$f412 = function () { - return 'SECOND'; + return 'PARTITION'; }; var peg$f413 = function () { - return 'CURRENT_TIME'; + return 'SET'; }; var peg$f414 = function () { - return 'CURRENT_TIMESTAMP'; + return 'TABLE'; }; var peg$f415 = function () { - return 'CURRENT_USER'; + return 'DATABASE'; }; var peg$f416 = function () { - return 'SESSION_USER'; + return 'SCHEMA'; }; var peg$f417 = function () { - return 'SYSTEM_USER'; + return 'SEQUENCE'; }; var peg$f418 = function () { - return 'GLOBAL'; + return 'TABLESPACE'; }; var peg$f419 = function () { - return 'SESSION'; + return 'COLLATE'; }; var peg$f420 = function () { - return 'LOCAL'; + return 'DEALLOCATE'; }; var peg$f421 = function () { - return 'PERSIST'; + return 'OFFSET'; }; var peg$f422 = function () { - return 'PERSIST_ONLY'; + return 'ASC'; }; var peg$f423 = function () { - return 'ADD'; + return 'DESC'; }; var peg$f424 = function () { - return 'COLUMN'; + return 'ALL'; }; var peg$f425 = function () { - return 'INDEX'; + return 'DISTINCT'; }; var peg$f426 = function () { - return 'KEY'; + return 'BETWEEN'; }; var peg$f427 = function () { - return 'FULLTEXT'; + return 'IN'; }; var peg$f428 = function () { - return 'SPATIAL'; + return 'IS'; }; var peg$f429 = function () { - return 'UNIQUE'; + return 'LIKE'; }; var peg$f430 = function () { - return 'KEY_BLOCK_SIZE'; + return 'ILIKE'; }; var peg$f431 = function () { - return 'COMMENT'; + /* => 'EXISTS' */ return 'EXISTS'; }; var peg$f432 = function () { - return 'CONSTRAINT'; + return 'NOT'; }; var peg$f433 = function () { - return 'CONCURRENTLY'; + return 'AND'; }; var peg$f434 = function () { + return 'OR'; + }; + var peg$f435 = function () { + return 'ARRAY'; + }; + var peg$f436 = function () { + return 'ARRAY_AGG'; + }; + var peg$f437 = function () { + return 'COUNT'; + }; + var peg$f438 = function () { + return 'GROUP_CONCAT'; + }; + var peg$f439 = function () { + return 'MAX'; + }; + var peg$f440 = function () { + return 'MIN'; + }; + var peg$f441 = function () { + return 'SUM'; + }; + var peg$f442 = function () { + return 'AVG'; + }; + var peg$f443 = function () { + return 'EXTRACT'; + }; + var peg$f444 = function () { + return 'CALL'; + }; + var peg$f445 = function () { + return 'CAST'; + }; + var peg$f446 = function () { + return 'BOOL'; + }; + var peg$f447 = function () { + return 'BOOLEAN'; + }; + var peg$f448 = function () { + return 'CHAR'; + }; + var peg$f449 = function () { + return 'CHARACTER'; + }; + var peg$f450 = function () { + return 'VARCHAR'; + }; + var peg$f451 = function () { + return 'NUMERIC'; + }; + var peg$f452 = function () { + return 'DECIMAL'; + }; + var peg$f453 = function () { + return 'SIGNED'; + }; + var peg$f454 = function () { + return 'UNSIGNED'; + }; + var peg$f455 = function () { + return 'INT'; + }; + var peg$f456 = function () { + return 'ZEROFILL'; + }; + var peg$f457 = function () { + return 'INTEGER'; + }; + var peg$f458 = function () { + return 'JSON'; + }; + var peg$f459 = function () { + return 'JSONB'; + }; + var peg$f460 = function () { + return 'GEOMETRY'; + }; + var peg$f461 = function () { + return 'SMALLINT'; + }; + var peg$f462 = function () { + return 'SERIAL'; + }; + var peg$f463 = function () { + return 'TINYINT'; + }; + var peg$f464 = function () { + return 'TINYTEXT'; + }; + var peg$f465 = function () { + return 'TEXT'; + }; + var peg$f466 = function () { + return 'MEDIUMTEXT'; + }; + var peg$f467 = function () { + return 'LONGTEXT'; + }; + var peg$f468 = function () { + return 'BIGINT'; + }; + var peg$f469 = function () { + return 'ENUM'; + }; + var peg$f470 = function () { + return 'FLOAT'; + }; + var peg$f471 = function () { + return 'DOUBLE PRECISION'; + }; + var peg$f472 = function () { + return 'BIGSERIAL'; + }; + var peg$f473 = function () { + return 'REAL'; + }; + var peg$f474 = function () { + return 'DATE'; + }; + var peg$f475 = function () { + return 'DATETIME'; + }; + var peg$f476 = function () { + return 'ROWS'; + }; + var peg$f477 = function () { + return 'TIME'; + }; + var peg$f478 = function () { + return 'TIMESTAMP'; + }; + var peg$f479 = function () { + return 'TRUNCATE'; + }; + var peg$f480 = function () { + return 'USER'; + }; + var peg$f481 = function () { + return 'UUID'; + }; + var peg$f482 = function () { + return 'OID'; + }; + var peg$f483 = function () { + return 'REGCLASS'; + }; + var peg$f484 = function () { + return 'REGCOLLATION'; + }; + var peg$f485 = function () { + return 'REGCONFIG'; + }; + var peg$f486 = function () { + return 'REGDICTIONARY'; + }; + var peg$f487 = function () { + return 'REGNAMESPACE'; + }; + var peg$f488 = function () { + return 'REGOPER'; + }; + var peg$f489 = function () { + return 'REGOPERATOR'; + }; + var peg$f490 = function () { + return 'REGPROC'; + }; + var peg$f491 = function () { + return 'REGPROCEDURE'; + }; + var peg$f492 = function () { + return 'REGROLE'; + }; + var peg$f493 = function () { + return 'REGTYPE'; + }; + var peg$f494 = function () { + return 'CURRENT_DATE'; + }; + var peg$f495 = function () { + return 'ADDDATE'; + }; + var peg$f496 = function () { + return 'INTERVAL'; + }; + var peg$f497 = function () { + return 'YEAR'; + }; + var peg$f498 = function () { + return 'MONTH'; + }; + var peg$f499 = function () { + return 'DAY'; + }; + var peg$f500 = function () { + return 'HOUR'; + }; + var peg$f501 = function () { + return 'MINUTE'; + }; + var peg$f502 = function () { + return 'SECOND'; + }; + var peg$f503 = function () { + return 'CURRENT_TIME'; + }; + var peg$f504 = function () { + return 'CURRENT_TIMESTAMP'; + }; + var peg$f505 = function () { + return 'CURRENT_USER'; + }; + var peg$f506 = function () { + return 'CURRENT_ROLE'; + }; + var peg$f507 = function () { + return 'SESSION_USER'; + }; + var peg$f508 = function () { + return 'SYSTEM_USER'; + }; + var peg$f509 = function () { + return 'GLOBAL'; + }; + var peg$f510 = function () { + return 'SESSION'; + }; + var peg$f511 = function () { + return 'LOCAL'; + }; + var peg$f512 = function () { + return 'PERSIST'; + }; + var peg$f513 = function () { + return 'PERSIST_ONLY'; + }; + var peg$f514 = function () { + return 'VIEW'; + }; + var peg$f515 = function () { + return 'ADD'; + }; + var peg$f516 = function () { + return 'COLUMN'; + }; + var peg$f517 = function () { + return 'INDEX'; + }; + var peg$f518 = function () { + return 'KEY'; + }; + var peg$f519 = function () { + return 'FULLTEXT'; + }; + var peg$f520 = function () { + return 'SPATIAL'; + }; + var peg$f521 = function () { + return 'UNIQUE'; + }; + var peg$f522 = function () { + return 'KEY_BLOCK_SIZE'; + }; + var peg$f523 = function () { + return 'COMMENT'; + }; + var peg$f524 = function () { + return 'CONSTRAINT'; + }; + var peg$f525 = function () { + return 'CONCURRENTLY'; + }; + var peg$f526 = function () { return 'REFERENCES'; }; - var peg$f435 = function (k, s, c) { + var peg$f527 = function (k, s, c) { // => { type: 'comment'; keyword: 'comment'; symbol: '='; value: literal_string; } return { type: k.toLowerCase(), @@ -4076,15 +5213,17 @@ function peg$parse(input, options) { value: c, }; }; - var peg$f436 = function () { + var peg$f528 = function () { varList = []; return true; }; - var peg$f437 = function (s) { - // => { type: 'proc'; stmt: assign_stmt | return_stmt; vars: any } + var peg$f529 = function (s) { + /* export interface proc_stmt { type: 'proc'; stmt: assign_stmt | return_stmt; vars: any } + => AstStatement + */ return { type: 'proc', stmt: s, vars: varList }; }; - var peg$f438 = function (va, s, e) { + var peg$f530 = function (va, s, e) { // => { type: 'assign'; left: var_decl | without_prefix_var_decl; symbol: ':=' | '='; right: proc_expr; } return { type: 'assign', @@ -4093,19 +5232,19 @@ function peg$parse(input, options) { right: e, }; }; - var peg$f439 = function (e) { + var peg$f531 = function (e) { // => { type: 'return'; expr: proc_expr; } return { type: 'return', expr: e }; }; - var peg$f440 = function (head, tail) { + var peg$f532 = function (head, tail) { // => binary_expr return createBinaryExprChain(head, tail); }; - var peg$f441 = function (head, tail) { + var peg$f533 = function (head, tail) { // => binary_expr return createBinaryExprChain(head, tail); }; - var peg$f442 = function (lt, op, rt, expr) { + var peg$f534 = function (lt, op, rt, expr) { // => { type: 'join'; ltable: var_decl; rtable: var_decl; op: join_op; expr: on_clause; } return { type: 'join', @@ -4115,12 +5254,26 @@ function peg$parse(input, options) { on: expr, }; }; - var peg$f443 = function (e) { + var peg$f535 = function (e) { // => proc_additive_expr & { parentheses: true; } e.parentheses = true; return e; }; - var peg$f444 = function (dt, tail) { + var peg$f536 = function (n, s) { + // => { type: 'var'; prefix: null; name: number; members: []; quoted: null } | column_ref + if (!s) + return { + type: 'var', + name: n, + prefix: null, + }; + return { + type: 'column_ref', + table: n, + column: s[2], + }; + }; + var peg$f537 = function (dt, tail) { // => string let name = dt; if (tail !== null) { @@ -4128,7 +5281,7 @@ function peg$parse(input, options) { } return name; }; - var peg$f445 = function (name, l) { + var peg$f538 = function (name, l) { // => { type: 'function'; name: string; args: null | { type: expr_list; value: proc_primary_list; }} //compatible with original func_call return { @@ -4140,27 +5293,19 @@ function peg$parse(input, options) { }, }; }; - var peg$f446 = function (name) { - // => IGNORE - return { - type: 'function', - name: name, - args: null, - }; - }; - var peg$f447 = function (head, tail) { + var peg$f539 = function (head, tail) { // => proc_primary[] return createList(head, tail); }; - var peg$f448 = function (l) { + var peg$f540 = function (l) { // => { type: 'array'; value: proc_primary_list } return { type: 'array', value: l }; }; - var peg$f449 = function (head, tail) { + var peg$f541 = function (head, tail) { // => var_decl[] return createList(head, tail); }; - var peg$f450 = function (p, d, s) { + var peg$f542 = function (p, d, s) { // => { type: 'var'; name: string; prefix: string; suffix: string; }; return { type: 'var', @@ -4169,10 +5314,10 @@ function peg$parse(input, options) { suffix: '$$', }; }; - var peg$f451 = function (f, d, s) { + var peg$f543 = function (f, d, s) { if (f !== s) return true; }; - var peg$f452 = function (f, d, s) { + var peg$f544 = function (f, d, s) { // => { type: 'var'; name: string; prefix: string; suffix: string; }; return { type: 'var', @@ -4181,7 +5326,7 @@ function peg$parse(input, options) { suffix: `$${s}$`, }; }; - var peg$f453 = function (p, d) { + var peg$f545 = function (p, d) { // => without_prefix_var_decl & { type: 'var'; prefix: string; }; // push for analysis return { @@ -4190,7 +5335,7 @@ function peg$parse(input, options) { prefix: p, }; }; - var peg$f454 = function (p, name, m, s) { + var peg$f546 = function (p, name, m, s) { // => { type: 'var'; prefix: string; name: ident_name; members: mem_chain; quoted: string | null } //push for analysis if ((p && !s) || (!p && s)) throw new Error('double quoted not match'); @@ -4203,7 +5348,7 @@ function peg$parse(input, options) { prefix: null, }; }; - var peg$f455 = function (n) { + var peg$f547 = function (n) { // => { type: 'var'; prefix: null; name: number; members: []; quoted: null } return { type: 'var', @@ -4213,7 +5358,7 @@ function peg$parse(input, options) { prefix: null, }; }; - var peg$f456 = function (l) { + var peg$f548 = function (l) { // => ident_name[]; const s = []; for (let i = 0; i < l.length; i++) { @@ -4221,38 +5366,39 @@ function peg$parse(input, options) { } return s; }; - var peg$f457 = function (t) { + var peg$f549 = function (t) { /* => data_type */ return { ...t, array: 'two' }; }; - var peg$f458 = function (t) { + var peg$f550 = function (t) { /* => data_type */ return { ...t, array: 'one' }; }; - var peg$f459 = function (t) { + var peg$f551 = function (t) { /* => data_type */ return { dataType: t }; }; - var peg$f460 = function () { + var peg$f552 = function () { /* => data_type */ return { dataType: 'BYTEA' }; }; - var peg$f461 = function (t, l) { + var peg$f553 = function () { + // => string + return 'CHARACTER VARYING'; + }; + var peg$f554 = function (t, l) { // => data_type - return { dataType: t, length: parseInt(l.join(''), 10) }; + return { dataType: t, length: parseInt(l.join(''), 10), parentheses: true }; }; - var peg$f462 = function (t) { + var peg$f555 = function (t) { /* => data_type */ return { dataType: t }; }; - var peg$f463 = function (t) { - /* => data_type */ return { dataType: t }; - }; - var peg$f464 = function (un, ze) { + var peg$f556 = function (un, ze) { // => any[]; const result = []; if (un) result.push(un); if (ze) result.push(ze); return result; }; - var peg$f465 = function (t, l, r, s) { + var peg$f557 = function (t, l, r, s) { /* => data_type */ return { dataType: t, length: parseInt(l.join(''), 10), @@ -4261,32 +5407,32 @@ function peg$parse(input, options) { suffix: s, }; }; - var peg$f466 = function (t, l, s) { + var peg$f558 = function (t, l, s) { /* => data_type */ return { dataType: t, length: parseInt(l.join(''), 10), suffix: s }; }; - var peg$f467 = function (t, s) { + var peg$f559 = function (t, s) { /* => data_type */ return { dataType: t, suffix: s }; }; - var peg$f468 = function (t) { + var peg$f560 = function (t) { /* => data_type */ return { dataType: t }; }; - var peg$f469 = function (w) { + var peg$f561 = function (w) { // => string[]; return [w.toUpperCase(), 'TIME', 'ZONE']; }; - var peg$f470 = function (t, l, tz) { + var peg$f562 = function (t, l, tz) { /* => data_type */ return { dataType: t, length: parseInt(l.join(''), 10), parentheses: true, suffix: tz }; }; - var peg$f471 = function (t, tz) { + var peg$f563 = function (t, tz) { /* => data_type */ return { dataType: t, suffix: tz }; }; - var peg$f472 = function (t, l) { + var peg$f564 = function (t, l) { /* => data_type */ return { dataType: t, length: parseInt(l.join(''), 10), parentheses: true }; }; - var peg$f473 = function (t) { + var peg$f565 = function (t) { /* => data_type */ return { dataType: t }; }; - var peg$f474 = function (t, e) { + var peg$f566 = function (t, e) { /* => data_type */ e.parentheses = true; return { @@ -4294,24 +5440,27 @@ function peg$parse(input, options) { expr: e, }; }; - var peg$f475 = function (t) { + var peg$f567 = function (t) { /* => data_type */ return { dataType: t }; }; - var peg$f476 = function (t) { + var peg$f568 = function (t) { /* => data_type */ return { dataType: t }; }; - var peg$f477 = function (t) { + var peg$f569 = function (t) { /* => data_type */ return { dataType: t }; }; - var peg$f478 = function (t) { + var peg$f570 = function (t) { /* => data_type */ return { dataType: `${t}[]` }; }; - var peg$f479 = function (t) { + var peg$f571 = function (t) { /* => data_type */ return { dataType: t }; }; - var peg$f480 = function (t) { + var peg$f572 = function (t) { /* => data_type */ return { dataType: t }; }; + var peg$f573 = function () { + /* => data_type */ return { dataType: 'RECORD' }; + }; var peg$currPos = 0; var peg$savedPos = 0; var peg$posDetailsCache = [{ line: 1, column: 1 }]; @@ -4470,12 +5619,9 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parse__(); - s2 = peg$parsemultiple_stmt(); + s2 = peg$parsecreate_function_stmt(); if (s2 === peg$FAILED) { - s2 = peg$parsecmd_stmt(); - if (s2 === peg$FAILED) { - s2 = peg$parsecrud_stmt(); - } + s2 = peg$parsemultiple_stmt(); } if (s2 !== peg$FAILED) { peg$savedPos = s0; @@ -4495,23 +5641,41 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$parsecreate_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parsetruncate_stmt(); + s0 = peg$parsedeclare_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parserename_stmt(); + s0 = peg$parsetruncate_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parsecall_stmt(); + s0 = peg$parserename_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parseuse_stmt(); + s0 = peg$parsecall_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parsealter_table_stmt(); + s0 = peg$parseuse_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parseset_stmt(); + s0 = peg$parsealter_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parselock_stmt(); + s0 = peg$parseset_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parseshow_stmt(); + s0 = peg$parselock_stmt(); if (s0 === peg$FAILED) { - s0 = peg$parsedeallocate_stmt(); + s0 = peg$parseshow_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsedeallocate_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsegrant_revoke_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parseif_else_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parseraise_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parseexecute_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsefor_loop_stmt(); + } + } + } + } + } + } } } } @@ -4540,6 +5704,18 @@ function peg$parse(input, options) { s0 = peg$parsecreate_sequence(); if (s0 === peg$FAILED) { s0 = peg$parsecreate_db_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsecreate_domain_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsecreate_type_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsecreate_view_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsecreate_aggregate_stmt(); + } + } + } + } } } } @@ -4549,6 +5725,26 @@ function peg$parse(input, options) { return s0; } + function peg$parsealter_stmt() { + var s0; + + s0 = peg$parsealter_table_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsealter_schema_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsealter_domain_type_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsealter_function_stmt(); + if (s0 === peg$FAILED) { + s0 = peg$parsealter_aggregate_stmt(); + } + } + } + } + + return s0; + } + function peg$parsecrud_stmt() { var s0; @@ -4599,37 +5795,28 @@ function peg$parse(input, options) { peg$currPos = s3; s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parse__(); - s5 = peg$parseSEMICOLON(); - if (s5 !== peg$FAILED) { - s6 = peg$parse__(); - s7 = peg$parsecrud_stmt(); - if (s7 !== peg$FAILED) { - s4 = [s4, s5, s6, s7]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseSEMICOLON(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecrud_stmt(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; } else { peg$currPos = s3; s3 = peg$FAILED; } + } else { + peg$currPos = s3; + s3 = peg$FAILED; } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f1(s1, s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; } + peg$savedPos = s0; + s0 = peg$f1(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4646,6 +5833,9 @@ function peg$parse(input, options) { if (s1 !== peg$FAILED) { s2 = peg$parse__(); s3 = peg$parseKW_ALL(); + if (s3 === peg$FAILED) { + s3 = peg$parseKW_DISTINCT(); + } if (s3 === peg$FAILED) { s3 = null; } @@ -4943,7 +6133,7 @@ function peg$parse(input, options) { s2 = peg$parse__(); s3 = peg$parseKW_DATABASE(); if (s3 === peg$FAILED) { - s3 = peg$parseKW_SCHEME(); + s3 = peg$parseKW_SCHEMA(); } if (s3 !== peg$FAILED) { s4 = peg$parse__(); @@ -4977,6 +6167,1991 @@ function peg$parse(input, options) { return s0; } + function peg$parseview_with() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseKW_WITH(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c4) { + s3 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e4); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c5) { + s3 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e5); + } + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c6) { + s5 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e6); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + if (input.substr(peg$currPos, 6) === peg$c7) { + s7 = peg$c7; + peg$currPos += 6; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e7); + } + } + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f8(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseKW_WITH(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c6) { + s3 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e6); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 6) === peg$c7) { + s5 = peg$c7; + peg$currPos += 6; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e7); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f9(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsewith_view_option() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c8) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e8); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_ASSIGIN_EQUAL(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c4) { + s5 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e4); + } + } + if (s5 === peg$FAILED) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c5) { + s5 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e5); + } + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f10(s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 16).toLowerCase() === peg$c9) { + s1 = input.substr(peg$currPos, 16); + peg$currPos += 16; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e9); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 16).toLowerCase() === peg$c10) { + s1 = input.substr(peg$currPos, 16); + peg$currPos += 16; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e10); + } + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_ASSIGIN_EQUAL(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseliteral_bool(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f11(s1, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsewith_view_options() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsewith_view_option(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsewith_view_option(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsewith_view_option(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f12(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecreate_view_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22; + + s0 = peg$currPos; + s1 = peg$parseKW_CREATE(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$currPos; + s4 = peg$parseKW_OR(); + if (s4 !== peg$FAILED) { + s5 = peg$parse__(); + s6 = peg$parseKW_REPLACE(); + if (s6 !== peg$FAILED) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse__(); + s5 = peg$parseKW_TEMP(); + if (s5 === peg$FAILED) { + s5 = peg$parseKW_TEMPORARY(); + } + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse__(); + s7 = peg$parseKW_RECURSIVE(); + if (s7 === peg$FAILED) { + s7 = null; + } + s8 = peg$parse__(); + s9 = peg$parseKW_VIEW(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parsetable_name(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$currPos; + s14 = peg$parseLPAREN(); + if (s14 !== peg$FAILED) { + s15 = peg$parse__(); + s16 = peg$parsecolumn_list(); + if (s16 !== peg$FAILED) { + s17 = peg$parse__(); + s18 = peg$parseRPAREN(); + if (s18 !== peg$FAILED) { + s14 = [s14, s15, s16, s17, s18]; + s13 = s14; + } else { + peg$currPos = s13; + s13 = peg$FAILED; + } + } else { + peg$currPos = s13; + s13 = peg$FAILED; + } + } else { + peg$currPos = s13; + s13 = peg$FAILED; + } + if (s13 === peg$FAILED) { + s13 = null; + } + s14 = peg$parse__(); + s15 = peg$currPos; + s16 = peg$parseKW_WITH(); + if (s16 !== peg$FAILED) { + s17 = peg$parse__(); + s18 = peg$parseLPAREN(); + if (s18 !== peg$FAILED) { + s19 = peg$parse__(); + s20 = peg$parsewith_view_options(); + if (s20 !== peg$FAILED) { + s21 = peg$parse__(); + s22 = peg$parseRPAREN(); + if (s22 !== peg$FAILED) { + s16 = [s16, s17, s18, s19, s20, s21, s22]; + s15 = s16; + } else { + peg$currPos = s15; + s15 = peg$FAILED; + } + } else { + peg$currPos = s15; + s15 = peg$FAILED; + } + } else { + peg$currPos = s15; + s15 = peg$FAILED; + } + } else { + peg$currPos = s15; + s15 = peg$FAILED; + } + if (s15 === peg$FAILED) { + s15 = null; + } + s16 = peg$parse__(); + s17 = peg$parseKW_AS(); + if (s17 !== peg$FAILED) { + s18 = peg$parse__(); + s19 = peg$parseselect_stmt_nake(); + if (s19 !== peg$FAILED) { + s20 = peg$parse__(); + s21 = peg$parseview_with(); + if (s21 === peg$FAILED) { + s21 = null; + } + peg$savedPos = s0; + s0 = peg$f13(s1, s3, s5, s7, s11, s13, s15, s19, s21); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecreate_aggregate_opt_required() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c11) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e11); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_ASSIGIN_EQUAL(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsetable_name(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseCOMMA(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c12) { + s9 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s9 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e12); + } + } + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parseKW_ASSIGIN_EQUAL(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parsedata_type(); + if (s13 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f14(s5, s13); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecreate_aggregate_opt_optional() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseident(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_ASSIGIN_EQUAL(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseident(); + if (s5 === peg$FAILED) { + s5 = peg$parseexpr(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f15(s1, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecreate_aggregate_opts() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsecreate_aggregate_opt_required(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecreate_aggregate_opt_optional(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecreate_aggregate_opt_optional(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f16(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecreate_aggregate_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19; + + s0 = peg$currPos; + s1 = peg$parseKW_CREATE(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$currPos; + s4 = peg$parseKW_OR(); + if (s4 !== peg$FAILED) { + s5 = peg$parse__(); + s6 = peg$parseKW_REPLACE(); + if (s6 !== peg$FAILED) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse__(); + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c13) { + s5 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e13); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsetable_name(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseLPAREN(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parseaggregate_signature(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parseRPAREN(); + if (s13 !== peg$FAILED) { + s14 = peg$parse__(); + s15 = peg$parseLPAREN(); + if (s15 !== peg$FAILED) { + s16 = peg$parse__(); + s17 = peg$parsecreate_aggregate_opts(); + if (s17 !== peg$FAILED) { + s18 = peg$parse__(); + s19 = peg$parseRPAREN(); + if (s19 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f17(s1, s3, s5, s7, s11, s17); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecolumn_data_type() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parsecolumn_ref(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parsedata_type(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f18(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecolumn_data_type_list() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsecolumn_data_type(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecolumn_data_type(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecolumn_data_type(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f19(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsefunc_returns() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c14) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e14); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c15) { + s3 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e15); + } + } + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse__(); + s5 = peg$parsedata_type(); + if (s5 === peg$FAILED) { + s5 = peg$parsetable_name(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f20(s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c14) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e14); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_TABLE(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseLPAREN(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecolumn_data_type_list(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseRPAREN(); + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f21(s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsedeclare_variable_item() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16; + + s0 = peg$currPos; + s1 = peg$parseident_name(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$f22(s1); + if (s2) { + s2 = undefined; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse__(); + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c16) { + s4 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e16); + } + } + if (s4 === peg$FAILED) { + s4 = null; + } + s5 = peg$parse__(); + s6 = peg$parsedata_type(); + if (s6 !== peg$FAILED) { + s7 = peg$parse__(); + s8 = peg$parsecollate_expr(); + if (s8 === peg$FAILED) { + s8 = null; + } + s9 = peg$parse__(); + s10 = peg$currPos; + s11 = peg$parseKW_NOT(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parseKW_NULL(); + if (s13 !== peg$FAILED) { + s11 = [s11, s12, s13]; + s10 = s11; + } else { + peg$currPos = s10; + s10 = peg$FAILED; + } + } else { + peg$currPos = s10; + s10 = peg$FAILED; + } + if (s10 === peg$FAILED) { + s10 = null; + } + s11 = peg$parse__(); + s12 = peg$currPos; + s13 = peg$parseKW_DEFAULT(); + if (s13 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c17) { + s13 = peg$c17; + peg$currPos += 2; + } else { + s13 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e17); + } + } + } + if (s13 === peg$FAILED) { + s13 = null; + } + s14 = peg$parse__(); + s15 = peg$currPos; + peg$silentFails++; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c18) { + s16 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s16 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e18); + } + } + peg$silentFails--; + if (s16 !== peg$FAILED) { + peg$currPos = s15; + s15 = undefined; + } else { + s15 = peg$FAILED; + } + if (s15 === peg$FAILED) { + s15 = peg$parseliteral(); + if (s15 === peg$FAILED) { + s15 = peg$parseexpr(); + } + } + if (s15 !== peg$FAILED) { + s13 = [s13, s14, s15]; + s12 = s13; + } else { + peg$currPos = s12; + s12 = peg$FAILED; + } + if (s12 === peg$FAILED) { + s12 = null; + } + s13 = peg$parse__(); + s14 = peg$parseSEMICOLON(); + if (s14 === peg$FAILED) { + s14 = null; + } + peg$savedPos = s0; + s0 = peg$f23(s1, s4, s6, s8, s10, s12, s14); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsedeclare_variables() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsedeclare_variable_item(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parsedeclare_variable_item(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parsedeclare_variable_item(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f24(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsedeclare_stmt() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c19) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e19); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parsedeclare_variables(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f25(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecreate_func_opt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8) === peg$c20) { + s1 = peg$c20; + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e20); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseident_name(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f26(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c21) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e21); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$currPos; + if (input.substr(peg$currPos, 3) === peg$c22) { + s4 = peg$c22; + peg$currPos += 3; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e22); + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse__(); + if (input.substr(peg$currPos, 4) === peg$c23) { + s6 = peg$c23; + peg$currPos += 4; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e23); + } + } + if (s6 !== peg$FAILED) { + s7 = peg$parse__(); + s8 = peg$parseident_name(); + if (s8 !== peg$FAILED) { + s4 = [s4, s5, s6, s7, s8]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f27(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c24) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e24); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c25) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e25); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c26) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e26); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c27) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e27); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c28) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e28); + } + } + } + } + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f28(s1); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c29) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e29); + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c30) { + s3 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e30); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f29(s1); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c31) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e31); + } + } + if (s1 === peg$FAILED) { + s1 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c14) { + s2 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e14); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parse__(); + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c32) { + s4 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e32); + } + } + if (s4 !== peg$FAILED) { + s2 = [s2, s3, s4]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c33) { + s3 = input.substr(peg$currPos, 2); + peg$currPos += 2; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e33); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c32) { + s5 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e32); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c34) { + s7 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e34); + } + } + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f30(s1); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c35) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e35); + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c36) { + s3 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e36); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c37) { + s5 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e37); + } + } + if (s5 === peg$FAILED) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c38) { + s5 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e38); + } + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f31(s1, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c39) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e39); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c40) { + s3 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e40); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c41) { + s3 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e41); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c42) { + s3 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e42); + } + } + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f32(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseKW_AS(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = []; + if (peg$r0.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e43); + } + } + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + if (peg$r0.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e43); + } + } + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsedeclare_stmt(); + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c18) { + s7 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e18); + } + } + if (s7 === peg$FAILED) { + s7 = null; + } + s8 = peg$parse__(); + s9 = peg$parsemultiple_stmt(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parseKW_END(); + if (s11 === peg$FAILED) { + s11 = null; + } + peg$savedPos = peg$currPos; + s12 = peg$f33(s3, s5, s7, s9, s11); + if (s12) { + s12 = undefined; + } else { + s12 = peg$FAILED; + } + if (s12 !== peg$FAILED) { + s13 = peg$parse__(); + s14 = peg$parseSEMICOLON(); + if (s14 === peg$FAILED) { + s14 = null; + } + s15 = peg$parse__(); + s16 = []; + if (peg$r1.test(input.charAt(peg$currPos))) { + s17 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s17 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e44); + } + } + if (s17 !== peg$FAILED) { + while (s17 !== peg$FAILED) { + s16.push(s17); + if (peg$r1.test(input.charAt(peg$currPos))) { + s17 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s17 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e44); + } + } + } + } else { + s16 = peg$FAILED; + } + if (s16 !== peg$FAILED) { + s17 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f34(s3, s5, s7, s9, s11, s16); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c43) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e45); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c44) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e46); + } + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseliteral_numeric(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f35(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c45) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e47); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseproc_func_name(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f36(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseKW_SET(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseident_name(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$currPos; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c46) { + s6 = input.substr(peg$currPos, 2); + peg$currPos += 2; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e48); + } + } + if (s6 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s6 = peg$c47; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e49); + } + } + } + if (s6 !== peg$FAILED) { + s7 = peg$parse__(); + s8 = peg$parseident_list(); + if (s8 !== peg$FAILED) { + s6 = [s6, s7, s8]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + if (s5 === peg$FAILED) { + s5 = peg$currPos; + s6 = peg$parseKW_FROM(); + if (s6 !== peg$FAILED) { + s7 = peg$parse__(); + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c48) { + s8 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e50); + } + } + if (s8 !== peg$FAILED) { + s6 = [s6, s7, s8]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f37(s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + } + } + } + } + } + + return s0; + } + + function peg$parsecreate_function_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20; + + s0 = peg$currPos; + s1 = peg$parseKW_CREATE(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$currPos; + s4 = peg$parseKW_OR(); + if (s4 !== peg$FAILED) { + s5 = peg$parse__(); + s6 = peg$parseKW_REPLACE(); + if (s6 !== peg$FAILED) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse__(); + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c49) { + s5 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e51); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsetable_name(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseLPAREN(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parsealter_func_args(); + if (s11 === peg$FAILED) { + s11 = null; + } + s12 = peg$parse__(); + s13 = peg$parseRPAREN(); + if (s13 !== peg$FAILED) { + s14 = peg$parse__(); + s15 = peg$parsefunc_returns(); + if (s15 === peg$FAILED) { + s15 = null; + } + s16 = peg$parse__(); + s17 = []; + s18 = peg$parsecreate_func_opt(); + while (s18 !== peg$FAILED) { + s17.push(s18); + s18 = peg$parsecreate_func_opt(); + } + s18 = peg$parse__(); + s19 = peg$parseSEMICOLON(); + if (s19 === peg$FAILED) { + s19 = null; + } + s20 = peg$parse__(); + peg$savedPos = s0; + s0 = peg$f38(s1, s3, s5, s7, s11, s15, s17); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecreate_type_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15; + + s0 = peg$currPos; + s1 = peg$parseKW_CREATE(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c50) { + s3 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e52); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsetable_name(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseKW_AS(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseKW_ENUM(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parseLPAREN(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parseexpr_list(); + if (s13 === peg$FAILED) { + s13 = null; + } + s14 = peg$parse__(); + s15 = peg$parseRPAREN(); + if (s15 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f39(s1, s3, s5, s7, s9, s13); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseKW_CREATE(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c50) { + s3 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e52); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsetable_name(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f40(s1, s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsecreate_domain_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15; + + s0 = peg$currPos; + s1 = peg$parseKW_CREATE(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c51) { + s3 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e53); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsetable_name(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseKW_AS(); + if (s7 === peg$FAILED) { + s7 = null; + } + s8 = peg$parse__(); + s9 = peg$parsedata_type(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parsecollate_expr(); + if (s11 === peg$FAILED) { + s11 = null; + } + s12 = peg$parse__(); + s13 = peg$parsedefault_expr(); + if (s13 === peg$FAILED) { + s13 = null; + } + s14 = peg$parse__(); + s15 = peg$parsecreate_constraint_check(); + if (s15 === peg$FAILED) { + s15 = null; + } + peg$savedPos = s0; + s0 = peg$f41(s1, s3, s5, s7, s9, s11, s13, s15); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsecreate_table_stmt() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19; @@ -5026,7 +8201,7 @@ function peg$parse(input, options) { s19 = null; } peg$savedPos = s0; - s0 = peg$f8(s1, s3, s7, s9, s11, s13, s15, s17, s19); + s0 = peg$f42(s1, s3, s7, s9, s11, s13, s15, s17, s19); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5067,7 +8242,7 @@ function peg$parse(input, options) { s11 = peg$parsecreate_like_table(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f9(s1, s3, s7, s9, s11); + s0 = peg$f43(s1, s3, s7, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5140,7 +8315,7 @@ function peg$parse(input, options) { s13 = null; } peg$savedPos = s0; - s0 = peg$f10(s1, s3, s7, s9, s11, s13); + s0 = peg$f44(s1, s3, s7, s9, s11, s13); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5161,13 +8336,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c4) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c52) { s1 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e4); + peg$fail(peg$e54); } } if (s1 !== peg$FAILED) { @@ -5180,7 +8355,7 @@ function peg$parse(input, options) { s5 = peg$parseliteral_numeric(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f11(s1, s3, s5); + s0 = peg$f45(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5197,13 +8372,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c5) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c53) { s1 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e5); + peg$fail(peg$e55); } } if (s1 !== peg$FAILED) { @@ -5211,7 +8386,7 @@ function peg$parse(input, options) { s3 = peg$parseliteral_numeric(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f12(s1, s3); + s0 = peg$f46(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5222,29 +8397,29 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c6) { + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c54) { s1 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e6); + peg$fail(peg$e56); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c5) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c53) { s3 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e5); + peg$fail(peg$e55); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f13(); + s0 = peg$f47(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5262,13 +8437,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c7) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c55) { s1 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e7); + peg$fail(peg$e57); } } if (s1 !== peg$FAILED) { @@ -5276,7 +8451,7 @@ function peg$parse(input, options) { s3 = peg$parseliteral_numeric(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f14(s1, s3); + s0 = peg$f48(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5287,29 +8462,29 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c6) { + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c54) { s1 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e6); + peg$fail(peg$e56); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c7) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c55) { s3 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e7); + peg$fail(peg$e57); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f15(); + s0 = peg$f49(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5327,13 +8502,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c8) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c56) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e8); + peg$fail(peg$e58); } } if (s1 !== peg$FAILED) { @@ -5346,7 +8521,7 @@ function peg$parse(input, options) { s5 = peg$parseliteral_numeric(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f16(s1, s3, s5); + s0 = peg$f50(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5363,13 +8538,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c9) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c57) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e9); + peg$fail(peg$e59); } } if (s1 !== peg$FAILED) { @@ -5377,7 +8552,7 @@ function peg$parse(input, options) { s3 = peg$parseliteral_numeric(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f17(s1, s3); + s0 = peg$f51(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5394,31 +8569,31 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c6) { + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c54) { s1 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e6); + peg$fail(peg$e56); } } if (s1 === peg$FAILED) { s1 = null; } s2 = peg$parse__(); - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c10) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c58) { s3 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e10); + peg$fail(peg$e60); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f18(s1); + s0 = peg$f52(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5431,13 +8606,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c11) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c59) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e11); + peg$fail(peg$e61); } } if (s1 !== peg$FAILED) { @@ -5445,18 +8620,18 @@ function peg$parse(input, options) { s3 = peg$parseKW_BY(); if (s3 !== peg$FAILED) { s4 = peg$parse__(); - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c12) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c60) { s5 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e12); + peg$fail(peg$e62); } } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f19(); + s0 = peg$f53(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5471,13 +8646,13 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c11) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c59) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e11); + peg$fail(peg$e61); } } if (s1 !== peg$FAILED) { @@ -5488,7 +8663,7 @@ function peg$parse(input, options) { s5 = peg$parsecolumn_ref(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f20(s1, s5); + s0 = peg$f54(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5563,7 +8738,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f21(s1, s2); + s0 = peg$f55(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5707,7 +8882,7 @@ function peg$parse(input, options) { } s28 = peg$parse__(); peg$savedPos = s0; - s0 = peg$f22(s1, s3, s5, s7, s9, s11, s13, s15, s19, s23, s25, s27); + s0 = peg$f56(s1, s3, s5, s7, s9, s11, s13, s15, s19, s23, s25, s27); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5785,7 +8960,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f23(s1, s2); + s0 = peg$f57(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5820,34 +8995,34 @@ function peg$parse(input, options) { } s8 = peg$parse__(); s9 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c13) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c61) { s10 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s10 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e13); + peg$fail(peg$e63); } } if (s10 !== peg$FAILED) { s11 = peg$parse__(); - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c14) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c62) { s12 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s12 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e14); + peg$fail(peg$e64); } } if (s12 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c15) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c63) { s12 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s12 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e15); + peg$fail(peg$e65); } } } @@ -5866,7 +9041,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f24(s1, s3, s5, s7, s9); + s0 = peg$f58(s1, s3, s5, s7, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5885,7 +9060,7 @@ function peg$parse(input, options) { s3 = peg$parsetable_ref_list(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f25(s3); + s0 = peg$f59(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5913,7 +9088,7 @@ function peg$parse(input, options) { s5 = peg$parseRPAREN(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f26(s3); + s0 = peg$f60(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5982,7 +9157,7 @@ function peg$parse(input, options) { s6 = peg$parseRPAREN(); if (s6 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f27(s3, s4); + s0 = peg$f61(s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6022,150 +9197,144 @@ function peg$parse(input, options) { s0 = peg$parsecolumn_constraint(); if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 14).toLowerCase() === peg$c16) { + if (input.substr(peg$currPos, 14).toLowerCase() === peg$c64) { s1 = input.substr(peg$currPos, 14); peg$currPos += 14; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e16); + peg$fail(peg$e66); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f28(s1); + s1 = peg$f62(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c17) { - s2 = input.substr(peg$currPos, 6); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c65) { + s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e17); - } - } - if (s2 !== peg$FAILED) { - s3 = peg$parse__(); - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c18) { - s4 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e18); - } - } - if (s4 === peg$FAILED) { - s4 = null; - } - s2 = [s2, s3, s4]; - s1 = s2; - } else { - peg$currPos = s1; s1 = peg$FAILED; - } - if (s1 === peg$FAILED) { - s1 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c19) { - s2 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e19); - } - } - if (s2 === peg$FAILED) { - s2 = null; - } - s3 = peg$parse__(); - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c18) { - s4 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e18); - } - } - if (s4 !== peg$FAILED) { - s2 = [s2, s3, s4]; - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e67); } } if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c66) { + s3 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e68); + } + } + if (s3 === peg$FAILED) { + s3 = null; + } peg$savedPos = s0; - s1 = peg$f29(s1); + s0 = peg$f63(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; } - s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsekeyword_comment(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f30(s1); + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c67) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e69); + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c66) { + s3 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e68); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f64(s1); + } else { + peg$currPos = s0; + s0 = peg$FAILED; } - s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsecollate_expr(); + s1 = peg$parsekeyword_comment(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f31(s1); + s1 = peg$f65(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsecolumn_format(); + s1 = peg$parsecollate_expr(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f32(s1); + s1 = peg$f66(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsestorage(); + s1 = peg$parsecolumn_format(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f33(s1); + s1 = peg$f67(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsereference_definition(); + s1 = peg$parsestorage(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f34(s1); + s1 = peg$f68(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsecreate_option_character_set_kw(); + s1 = peg$parsereference_definition(); if (s1 !== peg$FAILED) { - s2 = peg$parse__(); - s3 = peg$parseKW_ASSIGIN_EQUAL(); - if (s3 === peg$FAILED) { - s3 = null; - } - s4 = peg$parse__(); - s5 = peg$parseident_name(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f35(s1, s3, s5); + peg$savedPos = s0; + s1 = peg$f69(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsecreate_option_character_set_kw(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_ASSIGIN_EQUAL(); + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse__(); + s5 = peg$parseident_name(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f70(s1, s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; } - } else { - peg$currPos = s0; - s0 = peg$FAILED; } } } @@ -6211,7 +9380,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f36(s1, s3); + s0 = peg$f71(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6235,7 +9404,7 @@ function peg$parse(input, options) { s5 = null; } peg$savedPos = s0; - s0 = peg$f37(s1, s3, s5); + s0 = peg$f72(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6263,7 +9432,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f38(s1, s3); + s0 = peg$f73(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6281,7 +9450,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f39(s1, s3); + s0 = peg$f74(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6306,7 +9475,7 @@ function peg$parse(input, options) { s5 = peg$parseident(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f40(s3, s5); + s0 = peg$f75(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6323,51 +9492,51 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 13).toLowerCase() === peg$c20) { + if (input.substr(peg$currPos, 13).toLowerCase() === peg$c68) { s1 = input.substr(peg$currPos, 13); peg$currPos += 13; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e20); + peg$fail(peg$e70); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c21) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c69) { s3 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e21); + peg$fail(peg$e71); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c22) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c70) { s3 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e22); + peg$fail(peg$e72); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c23) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c71) { s3 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e23); + peg$fail(peg$e73); } } } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f41(s1, s3); + s0 = peg$f76(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6384,40 +9553,40 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c24) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c72) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e24); + peg$fail(peg$e74); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c25) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c73) { s3 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e25); + peg$fail(peg$e75); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c26) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c74) { s3 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e26); + peg$fail(peg$e76); } } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f42(s1, s3); + s0 = peg$f77(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6430,6 +9599,33 @@ function peg$parse(input, options) { return s0; } + function peg$parsedefault_arg_expr() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseKW_DEFAULT(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_ASSIGIN_EQUAL(); + } + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + s3 = peg$parseliteral(); + if (s3 === peg$FAILED) { + s3 = peg$parseexpr(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f78(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsedefault_expr() { var s0, s1, s2, s3; @@ -6443,7 +9639,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f43(s3); + s0 = peg$f79(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6496,7 +9692,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f44(s1, s2); + s0 = peg$f80(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6518,7 +9714,7 @@ function peg$parse(input, options) { s5 = peg$parsetable_ref_list(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f45(s1, s3, s5); + s0 = peg$f81(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6575,23 +9771,23 @@ function peg$parse(input, options) { s9 = peg$parsecolumn_ref(); if (s9 !== peg$FAILED) { s10 = peg$parse__(); - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c27) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c75) { s11 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s11 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e27); + peg$fail(peg$e77); } } if (s11 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c28) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c76) { s11 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s11 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e28); + peg$fail(peg$e78); } } } @@ -6599,7 +9795,7 @@ function peg$parse(input, options) { s11 = null; } peg$savedPos = s0; - s0 = peg$f46(s1, s3, s5, s7, s9, s11); + s0 = peg$f82(s1, s3, s5, s7, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6632,7 +9828,7 @@ function peg$parse(input, options) { s5 = peg$parsetable_ref_list(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f47(s1, s3, s5); + s0 = peg$f83(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6655,7 +9851,462 @@ function peg$parse(input, options) { s3 = peg$parseident(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f48(s3); + s0 = peg$f84(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseaggregate_signature() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseSTAR(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f85(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsealter_func_args(); + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + s3 = peg$parseKW_ORDER(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseKW_BY(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsealter_func_args(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f86(s1, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parsealter_func_args(); + } + } + + return s0; + } + + function peg$parsealter_func_argmode() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parseKW_IN(); + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c77) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e79); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c78) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e80); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c79) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e81); + } + } + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f87(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsealter_func_arg_item() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsealter_func_argmode(); + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + s3 = peg$parsedata_type(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsedefault_arg_expr(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f88(s1, s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsealter_func_argmode(); + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + s3 = peg$parseident_name(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsedata_type(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsedefault_arg_expr(); + if (s7 === peg$FAILED) { + s7 = null; + } + peg$savedPos = s0; + s0 = peg$f89(s1, s3, s5, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsealter_func_args() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsealter_func_arg_item(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsealter_func_arg_item(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsealter_func_arg_item(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f90(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsealter_aggregate_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13; + + s0 = peg$currPos; + s1 = peg$parseKW_ALTER(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c13) { + s3 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e13); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsetable_name(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseLPAREN(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseaggregate_signature(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parseRPAREN(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parseALTER_RENAME(); + if (s13 === peg$FAILED) { + s13 = peg$parseALTER_OWNER_TO(); + if (s13 === peg$FAILED) { + s13 = peg$parseALTER_SET_SCHEMA(); + } + } + if (s13 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f91(s3, s5, s9, s13); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsealter_function_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12; + + s0 = peg$currPos; + s1 = peg$parseKW_ALTER(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c49) { + s3 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e51); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsetable_name(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$currPos; + s8 = peg$parseLPAREN(); + if (s8 !== peg$FAILED) { + s9 = peg$parse__(); + s10 = peg$parsealter_func_args(); + if (s10 === peg$FAILED) { + s10 = null; + } + s11 = peg$parse__(); + s12 = peg$parseRPAREN(); + if (s12 !== peg$FAILED) { + s8 = [s8, s9, s10, s11, s12]; + s7 = s8; + } else { + peg$currPos = s7; + s7 = peg$FAILED; + } + } else { + peg$currPos = s7; + s7 = peg$FAILED; + } + if (s7 === peg$FAILED) { + s7 = null; + } + s8 = peg$parse__(); + s9 = peg$parseALTER_RENAME(); + if (s9 === peg$FAILED) { + s9 = peg$parseALTER_OWNER_TO(); + if (s9 === peg$FAILED) { + s9 = peg$parseALTER_SET_SCHEMA(); + } + } + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f92(s3, s5, s7, s9); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsealter_domain_type_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseKW_ALTER(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c51) { + s3 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e53); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c50) { + s3 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e52); + } + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parsetable_name(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseALTER_RENAME(); + if (s7 === peg$FAILED) { + s7 = peg$parseALTER_OWNER_TO(); + if (s7 === peg$FAILED) { + s7 = peg$parseALTER_SET_SCHEMA(); + } + } + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f93(s3, s5, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsealter_schema_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseKW_ALTER(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_SCHEMA(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseident_name(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseALTER_RENAME(); + if (s7 === peg$FAILED) { + s7 = peg$parseALTER_OWNER_TO(); + if (s7 === peg$FAILED) { + s7 = peg$parseALTER_SET_SCHEMA(); + } + } + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f94(s3, s5, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6684,7 +10335,7 @@ function peg$parse(input, options) { s7 = peg$parsealter_action_list(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f49(s5, s7); + s0 = peg$f95(s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6750,7 +10401,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f50(s1, s2); + s0 = peg$f96(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6772,7 +10423,7 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$parseALTER_ADD_FULLETXT_SPARITAL_INDEX(); if (s0 === peg$FAILED) { - s0 = peg$parseALTER_RENAME_TABLE(); + s0 = peg$parseALTER_RENAME(); if (s0 === peg$FAILED) { s0 = peg$parseALTER_ALGORITHM(); if (s0 === peg$FAILED) { @@ -6803,7 +10454,7 @@ function peg$parse(input, options) { s5 = peg$parsecreate_column_definition(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f51(s3, s5); + s0 = peg$f97(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6831,7 +10482,7 @@ function peg$parse(input, options) { s5 = peg$parsecolumn_ref(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f52(s3, s5); + s0 = peg$f98(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6854,7 +10505,7 @@ function peg$parse(input, options) { s3 = peg$parsecreate_constraint_definition(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f53(s3); + s0 = peg$f99(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6877,7 +10528,7 @@ function peg$parse(input, options) { s3 = peg$parsecreate_index_definition(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f54(s3); + s0 = peg$f100(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6890,7 +10541,7 @@ function peg$parse(input, options) { return s0; } - function peg$parseALTER_RENAME_TABLE() { + function peg$parseALTER_RENAME() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; @@ -6908,7 +10559,108 @@ function peg$parse(input, options) { s5 = peg$parseident(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f55(s3, s5); + s0 = peg$f101(s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseALTER_OWNER_TO() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c80) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e82); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_TO(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseident(); + if (s5 === peg$FAILED) { + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c81) { + s5 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e83); + } + } + if (s5 === peg$FAILED) { + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c82) { + s5 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e84); + } + } + if (s5 === peg$FAILED) { + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c83) { + s5 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e85); + } + } + } + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f102(s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseALTER_SET_SCHEMA() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseKW_SET(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_SCHEMA(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseident(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f103(s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -6925,13 +10677,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c29) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c84) { s1 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e29); + peg$fail(peg$e86); } } if (s1 !== peg$FAILED) { @@ -6941,43 +10693,43 @@ function peg$parse(input, options) { s3 = null; } s4 = peg$parse__(); - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c23) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c71) { s5 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e23); + peg$fail(peg$e73); } } if (s5 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c30) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c85) { s5 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e30); + peg$fail(peg$e87); } } if (s5 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c31) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c86) { s5 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e31); + peg$fail(peg$e88); } } if (s5 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c32) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c87) { s5 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e32); + peg$fail(peg$e89); } } } @@ -6985,7 +10737,7 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f56(s3, s5); + s0 = peg$f104(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7002,13 +10754,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c33) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c88) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e33); + peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { @@ -7018,43 +10770,43 @@ function peg$parse(input, options) { s3 = null; } s4 = peg$parse__(); - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c23) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c71) { s5 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e23); + peg$fail(peg$e73); } } if (s5 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c12) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c60) { s5 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e12); + peg$fail(peg$e62); } } if (s5 === peg$FAILED) { - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c34) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c89) { s5 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e34); + peg$fail(peg$e91); } } if (s5 === peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c35) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c90) { s5 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e35); + peg$fail(peg$e92); } } } @@ -7062,7 +10814,7 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f57(s3, s5); + s0 = peg$f105(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7104,7 +10856,7 @@ function peg$parse(input, options) { } s10 = peg$parse__(); peg$savedPos = s0; - s0 = peg$f58(s1, s3, s5, s7, s9); + s0 = peg$f106(s1, s3, s5, s7, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7149,7 +10901,7 @@ function peg$parse(input, options) { } s10 = peg$parse__(); peg$savedPos = s0; - s0 = peg$f59(s1, s3, s5, s7, s9); + s0 = peg$f107(s1, s3, s5, s7, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7170,6 +10922,9 @@ function peg$parse(input, options) { s0 = peg$parsecreate_constraint_unique(); if (s0 === peg$FAILED) { s0 = peg$parsecreate_constraint_foreign(); + if (s0 === peg$FAILED) { + s0 = peg$parsecreate_constraint_check(); + } } } @@ -7188,7 +10943,57 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f60(s1, s3); + s0 = peg$f108(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsecreate_constraint_check() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + s0 = peg$currPos; + s1 = peg$parseconstraint_name(); + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c6) { + s3 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e6); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseLPAREN(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseor_and_where_expr(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseRPAREN(); + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f109(s1, s3, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7206,13 +11011,13 @@ function peg$parse(input, options) { s1 = null; } s2 = peg$parse__(); - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c36) { + if (input.substr(peg$currPos, 11).toLowerCase() === peg$c91) { s3 = input.substr(peg$currPos, 11); peg$currPos += 11; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e36); + peg$fail(peg$e93); } } if (s3 !== peg$FAILED) { @@ -7230,7 +11035,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f61(s1, s3, s5, s7, s9); + s0 = peg$f110(s1, s3, s5, s7, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7281,7 +11086,7 @@ function peg$parse(input, options) { s13 = null; } peg$savedPos = s0; - s0 = peg$f62(s1, s3, s5, s7, s9, s11, s13); + s0 = peg$f111(s1, s3, s5, s7, s9, s11, s13); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7303,13 +11108,13 @@ function peg$parse(input, options) { s1 = null; } s2 = peg$parse__(); - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c37) { + if (input.substr(peg$currPos, 11).toLowerCase() === peg$c92) { s3 = input.substr(peg$currPos, 11); peg$currPos += 11; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e37); + peg$fail(peg$e94); } } if (s3 !== peg$FAILED) { @@ -7327,7 +11132,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f63(s1, s3, s5, s7, s9); + s0 = peg$f112(s1, s3, s5, s7, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7353,33 +11158,33 @@ function peg$parse(input, options) { s5 = peg$parsecte_column_definition(); if (s5 !== peg$FAILED) { s6 = peg$parse__(); - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c38) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c93) { s7 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e38); + peg$fail(peg$e95); } } if (s7 === peg$FAILED) { - if (input.substr(peg$currPos, 13).toLowerCase() === peg$c39) { + if (input.substr(peg$currPos, 13).toLowerCase() === peg$c94) { s7 = input.substr(peg$currPos, 13); peg$currPos += 13; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e39); + peg$fail(peg$e96); } } if (s7 === peg$FAILED) { - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c40) { + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c95) { s7 = input.substr(peg$currPos, 12); peg$currPos += 12; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e40); + peg$fail(peg$e97); } } } @@ -7398,7 +11203,7 @@ function peg$parse(input, options) { s11 = null; } peg$savedPos = s0; - s0 = peg$f64(s1, s3, s5, s7, s9, s11); + s0 = peg$f113(s1, s3, s5, s7, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7416,7 +11221,7 @@ function peg$parse(input, options) { s1 = peg$parseon_reference(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f65(s1); + s1 = peg$f114(s1); } s0 = s1; } @@ -7440,7 +11245,7 @@ function peg$parse(input, options) { s5 = peg$parsereference_option(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f66(s3, s5); + s0 = peg$f115(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7458,67 +11263,100 @@ function peg$parse(input, options) { } function peg$parsereference_option() { - var s0, s1; + var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c28) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e28); + s1 = peg$parseKW_CURRENT_TIMESTAMP(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseLPAREN(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseexpr_list(); + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse__(); + s7 = peg$parseRPAREN(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f116(s1, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; } + } else { + peg$currPos = s0; + s0 = peg$FAILED; } - if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c27) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c76) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e27); + peg$fail(peg$e78); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c41) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c75) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e41); + peg$fail(peg$e77); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c42) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c96) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e42); + peg$fail(peg$e98); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c43) { - s1 = input.substr(peg$currPos, 11); - peg$currPos += 11; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c97) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e43); + peg$fail(peg$e99); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 11).toLowerCase() === peg$c98) { + s1 = input.substr(peg$currPos, 11); + peg$currPos += 11; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e100); + } + } + if (s1 === peg$FAILED) { + s1 = peg$parseKW_CURRENT_TIMESTAMP(); } } } } } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f117(s1); + } + s0 = s1; } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f67(s1); - } - s0 = s1; return s0; } @@ -7553,142 +11391,175 @@ function peg$parse(input, options) { s26, s27, s28, - s29; + s29, + s30, + s31; s0 = peg$currPos; s1 = peg$parseKW_CREATE(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - s3 = peg$parseKW_CONSTRAINT(); + s3 = peg$currPos; + s4 = peg$parseKW_OR(); + if (s4 !== peg$FAILED) { + s5 = peg$parse__(); + s6 = peg$parseKW_REPLACE(); + if (s6 !== peg$FAILED) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } if (s3 === peg$FAILED) { s3 = null; } s4 = peg$parse__(); - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c44) { - s5 = input.substr(peg$currPos, 7); + s5 = peg$parseKW_CONSTRAINT(); + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse__(); + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c99) { + s7 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { - s5 = peg$FAILED; + s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e44); + peg$fail(peg$e101); } } - if (s5 !== peg$FAILED) { - s6 = peg$parse__(); - s7 = peg$parseident_name(); - if (s7 !== peg$FAILED) { - s8 = peg$parse__(); - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c45) { - s9 = input.substr(peg$currPos, 6); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseident_name(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c100) { + s11 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { - s9 = peg$FAILED; + s11 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e45); + peg$fail(peg$e102); } } - if (s9 === peg$FAILED) { - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c46) { - s9 = input.substr(peg$currPos, 5); + if (s11 === peg$FAILED) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c101) { + s11 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { - s9 = peg$FAILED; + s11 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e46); + peg$fail(peg$e103); } } - if (s9 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c47) { - s9 = input.substr(peg$currPos, 10); + if (s11 === peg$FAILED) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c102) { + s11 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { - s9 = peg$FAILED; + s11 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e47); + peg$fail(peg$e104); } } } } - if (s9 !== peg$FAILED) { - s10 = peg$parse__(); - s11 = peg$parsetrigger_event_list(); - if (s11 !== peg$FAILED) { - s12 = peg$parse__(); - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c48) { - s13 = input.substr(peg$currPos, 2); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parsetrigger_event_list(); + if (s13 !== peg$FAILED) { + s14 = peg$parse__(); + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c33) { + s15 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { - s13 = peg$FAILED; + s15 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e48); + peg$fail(peg$e33); } } - if (s13 !== peg$FAILED) { - s14 = peg$parse__(); - s15 = peg$parsetable_name(); - if (s15 !== peg$FAILED) { - s16 = peg$parse__(); - s17 = peg$currPos; - s18 = peg$parseKW_FROM(); - if (s18 !== peg$FAILED) { - s19 = peg$parse__(); - s20 = peg$parsetable_name(); - if (s20 !== peg$FAILED) { - s18 = [s18, s19, s20]; - s17 = s18; + if (s15 !== peg$FAILED) { + s16 = peg$parse__(); + s17 = peg$parsetable_name(); + if (s17 !== peg$FAILED) { + s18 = peg$parse__(); + s19 = peg$currPos; + s20 = peg$parseKW_FROM(); + if (s20 !== peg$FAILED) { + s21 = peg$parse__(); + s22 = peg$parsetable_name(); + if (s22 !== peg$FAILED) { + s20 = [s20, s21, s22]; + s19 = s20; } else { - peg$currPos = s17; - s17 = peg$FAILED; + peg$currPos = s19; + s19 = peg$FAILED; } } else { - peg$currPos = s17; - s17 = peg$FAILED; + peg$currPos = s19; + s19 = peg$FAILED; } - if (s17 === peg$FAILED) { - s17 = null; - } - s18 = peg$parse__(); - s19 = peg$parsetrigger_deferrable(); if (s19 === peg$FAILED) { s19 = null; } s20 = peg$parse__(); - s21 = peg$parsetrigger_for_row(); + s21 = peg$parsetrigger_deferrable(); if (s21 === peg$FAILED) { s21 = null; } s22 = peg$parse__(); - s23 = peg$parsetrigger_when(); + s23 = peg$parsetrigger_for_row(); if (s23 === peg$FAILED) { s23 = null; } s24 = peg$parse__(); - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c49) { - s25 = input.substr(peg$currPos, 7); + s25 = peg$parsetrigger_when(); + if (s25 === peg$FAILED) { + s25 = null; + } + s26 = peg$parse__(); + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c103) { + s27 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { - s25 = peg$FAILED; + s27 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e49); + peg$fail(peg$e105); } } - if (s25 !== peg$FAILED) { - s26 = peg$parse__(); - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c50) { - s27 = input.substr(peg$currPos, 9); + if (s27 !== peg$FAILED) { + s28 = peg$parse__(); + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c104) { + s29 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { - s27 = peg$FAILED; + s29 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e50); + peg$fail(peg$e106); } } - if (s27 !== peg$FAILED) { - s28 = peg$parse__(); - s29 = peg$parseproc_func_call(); - if (s29 !== peg$FAILED) { + if (s29 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c49) { + s29 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s29 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e51); + } + } + } + if (s29 !== peg$FAILED) { + s30 = peg$parse__(); + s31 = peg$parseproc_func_call(); + if (s31 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f68(s1, s3, s5, s7, s9, s11, s13, s15, s17, s19, s21, s23, s25, s29); + s0 = peg$f118(s1, s3, s5, s7, s9, s11, s13, s15, s17, s19, s21, s23, s25, s27, s29, s31); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7746,7 +11617,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f69(s1); + s1 = peg$f119(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -7755,13 +11626,13 @@ function peg$parse(input, options) { if (s1 !== peg$FAILED) { s2 = peg$parse__(); s3 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c51) { + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c105) { s4 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e51); + peg$fail(peg$e107); } } if (s4 !== peg$FAILED) { @@ -7782,7 +11653,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f70(s1, s3); + s0 = peg$f120(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7837,7 +11708,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f71(s1, s2); + s0 = peg$f121(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7851,26 +11722,26 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c52) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c29) { s2 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e52); + peg$fail(peg$e29); } } if (s2 === peg$FAILED) { s2 = null; } s3 = peg$parse__(); - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c53) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c106) { s4 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e53); + peg$fail(peg$e108); } } if (s4 !== peg$FAILED) { @@ -7882,29 +11753,29 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 19).toLowerCase() === peg$c54) { + if (input.substr(peg$currPos, 19).toLowerCase() === peg$c107) { s3 = input.substr(peg$currPos, 19); peg$currPos += 19; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e54); + peg$fail(peg$e109); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 18).toLowerCase() === peg$c55) { + if (input.substr(peg$currPos, 18).toLowerCase() === peg$c108) { s3 = input.substr(peg$currPos, 18); peg$currPos += 18; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e55); + peg$fail(peg$e110); } } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f72(s1, s3); + s0 = peg$f122(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7921,53 +11792,53 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c56) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c109) { s1 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e56); + peg$fail(peg$e111); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c57) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c110) { s3 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e57); + peg$fail(peg$e112); } } if (s3 === peg$FAILED) { s3 = null; } s4 = peg$parse__(); - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c58) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c111) { s5 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e58); + peg$fail(peg$e113); } } if (s5 === peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c59) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c112) { s5 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e59); + peg$fail(peg$e114); } } } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f73(s1, s3, s5); + s0 = peg$f123(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -7996,7 +11867,7 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f74(s5); + s0 = peg$f124(s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8058,7 +11929,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f75(s1, s2); + s0 = peg$f125(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8071,29 +11942,29 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c60) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c113) { s1 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e60); + peg$fail(peg$e115); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c61) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c114) { s3 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e61); + peg$fail(peg$e116); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f76(); + s0 = peg$f126(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8117,23 +11988,23 @@ function peg$parse(input, options) { s2 = peg$parse__(); s3 = peg$parsecreate_option_character_set_kw(); if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c62) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c115) { s3 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e62); + peg$fail(peg$e117); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c63) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c116) { s3 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e63); + peg$fail(peg$e118); } } } @@ -8148,7 +12019,7 @@ function peg$parse(input, options) { s7 = peg$parseident_name(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f77(s1, s3, s5, s7); + s0 = peg$f127(s1, s3, s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8165,63 +12036,63 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7, s8; s0 = peg$currPos; - if (input.substr(peg$currPos, 14).toLowerCase() === peg$c16) { + if (input.substr(peg$currPos, 14).toLowerCase() === peg$c64) { s1 = input.substr(peg$currPos, 14); peg$currPos += 14; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e16); + peg$fail(peg$e66); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 14).toLowerCase() === peg$c64) { + if (input.substr(peg$currPos, 14).toLowerCase() === peg$c117) { s1 = input.substr(peg$currPos, 14); peg$currPos += 14; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e64); + peg$fail(peg$e119); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 14).toLowerCase() === peg$c65) { + if (input.substr(peg$currPos, 14).toLowerCase() === peg$c118) { s1 = input.substr(peg$currPos, 14); peg$currPos += 14; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e65); + peg$fail(peg$e120); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c66) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c119) { s1 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e66); + peg$fail(peg$e121); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c67) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c120) { s1 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e67); + peg$fail(peg$e122); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 18).toLowerCase() === peg$c68) { + if (input.substr(peg$currPos, 18).toLowerCase() === peg$c121) { s1 = input.substr(peg$currPos, 18); peg$currPos += 18; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e68); + peg$fail(peg$e123); } } } @@ -8239,7 +12110,7 @@ function peg$parse(input, options) { s5 = peg$parseliteral_numeric(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f78(s1, s3, s5); + s0 = peg$f128(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8254,13 +12125,13 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parseKW_COMMENT(); if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c69) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c122) { s1 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e69); + peg$fail(peg$e124); } } } @@ -8274,7 +12145,7 @@ function peg$parse(input, options) { s5 = peg$parseliteral_string(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f79(s1, s3, s5); + s0 = peg$f129(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8285,13 +12156,13 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c70) { + if (input.substr(peg$currPos, 11).toLowerCase() === peg$c123) { s1 = input.substr(peg$currPos, 11); peg$currPos += 11; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e70); + peg$fail(peg$e125); } } if (s1 !== peg$FAILED) { @@ -8303,54 +12174,54 @@ function peg$parse(input, options) { s4 = peg$parse__(); s5 = peg$currPos; if (input.charCodeAt(peg$currPos) === 39) { - s6 = peg$c71; + s6 = peg$c124; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s6 !== peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c72) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c125) { s7 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e72); + peg$fail(peg$e127); } } if (s7 === peg$FAILED) { - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c73) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c126) { s7 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e73); + peg$fail(peg$e128); } } if (s7 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c12) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c60) { s7 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e12); + peg$fail(peg$e62); } } } } if (s7 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 39) { - s8 = peg$c71; + s8 = peg$c124; peg$currPos++; } else { s8 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s8 !== peg$FAILED) { @@ -8370,7 +12241,7 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f80(s1, s3, s5); + s0 = peg$f130(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8381,13 +12252,13 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c74) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c127) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e74); + peg$fail(peg$e129); } } if (s1 !== peg$FAILED) { @@ -8400,7 +12271,7 @@ function peg$parse(input, options) { s5 = peg$parseident_name(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f81(s1, s3, s5); + s0 = peg$f131(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8427,7 +12298,7 @@ function peg$parse(input, options) { s3 = peg$parsecreate_fulltext_spatial_index_definition(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f82(s3); + s0 = peg$f132(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8453,7 +12324,7 @@ function peg$parse(input, options) { s5 = peg$parsetable_to_list(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f83(s5); + s0 = peg$f133(s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8497,7 +12368,7 @@ function peg$parse(input, options) { s5 = peg$parseassign_stmt(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f84(s3, s5); + s0 = peg$f134(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8514,94 +12385,94 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c75) { + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c128) { s1 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e75); + peg$fail(peg$e130); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c76) { + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c129) { s3 = input.substr(peg$currPos, 12); peg$currPos += 12; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e76); + peg$fail(peg$e131); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c77) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c130) { s3 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e77); + peg$fail(peg$e132); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 13).toLowerCase() === peg$c78) { + if (input.substr(peg$currPos, 13).toLowerCase() === peg$c131) { s3 = input.substr(peg$currPos, 13); peg$currPos += 13; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e78); + peg$fail(peg$e133); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 22).toLowerCase() === peg$c79) { + if (input.substr(peg$currPos, 22).toLowerCase() === peg$c132) { s3 = input.substr(peg$currPos, 22); peg$currPos += 22; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e79); + peg$fail(peg$e134); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 19).toLowerCase() === peg$c80) { + if (input.substr(peg$currPos, 19).toLowerCase() === peg$c133) { s3 = input.substr(peg$currPos, 19); peg$currPos += 19; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e80); + peg$fail(peg$e135); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c35) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c90) { s3 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e35); + peg$fail(peg$e92); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 16).toLowerCase() === peg$c81) { + if (input.substr(peg$currPos, 16).toLowerCase() === peg$c134) { s3 = input.substr(peg$currPos, 16); peg$currPos += 16; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e81); + peg$fail(peg$e136); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c82) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c135) { s3 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e82); + peg$fail(peg$e137); } } } @@ -8613,18 +12484,18 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { s4 = peg$parse__(); - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c83) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c136) { s5 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e83); + peg$fail(peg$e138); } } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f85(s3); + s0 = peg$f135(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8661,20 +12532,20 @@ function peg$parse(input, options) { s7 = null; } s8 = peg$parse__(); - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c84) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c137) { s9 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s9 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e84); + peg$fail(peg$e139); } } if (s9 === peg$FAILED) { s9 = null; } peg$savedPos = s0; - s0 = peg$f86(s3, s5, s7, s9); + s0 = peg$f136(s3, s5, s7, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8697,7 +12568,7 @@ function peg$parse(input, options) { s3 = peg$parseproc_func_call(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f87(s3); + s0 = peg$f137(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8717,18 +12588,18 @@ function peg$parse(input, options) { s1 = peg$parseKW_SHOW(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c85) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c138) { s3 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e85); + peg$fail(peg$e140); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f88(); + s0 = peg$f138(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8745,7 +12616,7 @@ function peg$parse(input, options) { s3 = peg$parsewithout_prefix_var_decl(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f89(s3); + s0 = peg$f139(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8766,13 +12637,13 @@ function peg$parse(input, options) { s1 = peg$parseKW_DEALLOCATE(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c86) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c139) { s3 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e86); + peg$fail(peg$e141); } } if (s3 === peg$FAILED) { @@ -8785,7 +12656,1803 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f90(s3, s5); + s0 = peg$f140(s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsepriv_type_table() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parseKW_SELECT(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_INSERT(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_UPDATE(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_DELETE(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_TRUNCATE(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_REFERENCES(); + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c99) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e101); + } + } + } + } + } + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f141(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsepriv_type_sequence() { + var s0, s1; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c140) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e142); + } + } + if (s1 === peg$FAILED) { + s1 = peg$parseKW_SELECT(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_UPDATE(); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f142(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsepriv_type_database() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parseKW_CREATE(); + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c141) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e143); + } + } + if (s1 === peg$FAILED) { + s1 = peg$parseKW_TEMPORARY(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_TEMP(); + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f143(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseprive_type_all() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseKW_ALL(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$parse__(); + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c142) { + s4 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e144); + } + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = null; + } + peg$savedPos = s0; + s0 = peg$f144(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseprive_type_usage() { + var s0, s1; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c140) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e142); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f145(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$parseprive_type_all(); + } + + return s0; + } + + function peg$parseprive_type_execute() { + var s0, s1; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c103) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e105); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f146(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$parseprive_type_all(); + } + + return s0; + } + + function peg$parsepriv_type() { + var s0; + + s0 = peg$parsepriv_type_table(); + if (s0 === peg$FAILED) { + s0 = peg$parsepriv_type_sequence(); + if (s0 === peg$FAILED) { + s0 = peg$parsepriv_type_database(); + if (s0 === peg$FAILED) { + s0 = peg$parseprive_type_usage(); + if (s0 === peg$FAILED) { + s0 = peg$parseprive_type_execute(); + } + } + } + } + + return s0; + } + + function peg$parsepriv_item() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + s1 = peg$parsepriv_type(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$currPos; + s4 = peg$parseLPAREN(); + if (s4 !== peg$FAILED) { + s5 = peg$parse__(); + s6 = peg$parsecolumn_ref_list(); + if (s6 !== peg$FAILED) { + s7 = peg$parse__(); + s8 = peg$parseRPAREN(); + if (s8 !== peg$FAILED) { + s4 = [s4, s5, s6, s7, s8]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 === peg$FAILED) { + s3 = null; + } + peg$savedPos = s0; + s0 = peg$f147(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsepriv_list() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsepriv_item(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsepriv_item(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsepriv_item(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f148(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseobject_type() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseKW_TABLE(); + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c143) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e145); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c144) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e146); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 6) === peg$c145) { + s1 = peg$c145; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e147); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 8) === peg$c146) { + s1 = peg$c146; + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e148); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c104) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e106); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c147) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e149); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c148) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e150); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c149) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e151); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 6) === peg$c150) { + s1 = peg$c150; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e152); + } + } + } + } + } + } + } + } + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f149(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseKW_ALL(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c138) { + s3 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e140); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c143) { + s3 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e145); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c151) { + s3 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e153); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c152) { + s3 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e154); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c153) { + s3 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e155); + } + } + } + } + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseKW_IN(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseKW_SCHEMA(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f150(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsepriv_level() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = peg$parseident(); + if (s2 !== peg$FAILED) { + s3 = peg$parse__(); + s4 = peg$parseDOT(); + if (s4 !== peg$FAILED) { + s2 = [s2, s3, s4]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + s3 = peg$parseident(); + if (s3 === peg$FAILED) { + s3 = peg$parseSTAR(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f151(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsepriv_level_list() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsepriv_level(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsepriv_level(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsepriv_level(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f152(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseuser_or_role() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseKW_GROUP(); + if (s1 === peg$FAILED) { + s1 = null; + } + s2 = peg$parse__(); + s3 = peg$parseident(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f153(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c154) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e156); + } + } + if (s1 === peg$FAILED) { + s1 = peg$parseKW_CURRENT_ROLE(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_CURRENT_USER(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_SESSION_USER(); + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f154(s1); + } + s0 = s1; + } + + return s0; + } + + function peg$parseuser_or_role_list() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseuser_or_role(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseuser_or_role(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseuser_or_role(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f155(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsewith_grant_option() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseKW_WITH(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c155) { + s3 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e157); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c156) { + s5 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e158); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f156(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsewith_admin_option() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseKW_WITH(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c157) { + s3 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e159); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c156) { + s5 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e158); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f157(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsegrant_revoke_keyword() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c155) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e157); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f158(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c158) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e160); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c155) { + s4 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e157); + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse__(); + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c156) { + s6 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e158); + } + } + if (s6 !== peg$FAILED) { + s7 = peg$parse__(); + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c109) { + s8 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e111); + } + } + if (s8 !== peg$FAILED) { + s4 = [s4, s5, s6, s7, s8]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 === peg$FAILED) { + s3 = null; + } + peg$savedPos = s0; + s0 = peg$f159(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsegrant_revoke_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16; + + s0 = peg$currPos; + s1 = peg$parsegrant_revoke_keyword(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parsepriv_list(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseKW_ON(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseobject_type(); + if (s7 === peg$FAILED) { + s7 = null; + } + s8 = peg$parse__(); + s9 = peg$parsepriv_level_list(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parseKW_TO(); + if (s11 === peg$FAILED) { + s11 = peg$parseKW_FROM(); + } + if (s11 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s12 = peg$f160(s1, s3, s7, s9, s11); + if (s12) { + s12 = undefined; + } else { + s12 = peg$FAILED; + } + if (s12 !== peg$FAILED) { + s13 = peg$parse__(); + s14 = peg$parseuser_or_role_list(); + if (s14 !== peg$FAILED) { + s15 = peg$parse__(); + s16 = peg$parsewith_grant_option(); + if (s16 === peg$FAILED) { + s16 = null; + } + peg$savedPos = s0; + s0 = peg$f161(s1, s3, s7, s9, s11, s14, s16); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsegrant_revoke_keyword(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseident_list(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseKW_TO(); + if (s5 === peg$FAILED) { + s5 = peg$parseKW_FROM(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s6 = peg$f162(s1, s3, s5); + if (s6) { + s6 = undefined; + } else { + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + s7 = peg$parse__(); + s8 = peg$parseuser_or_role_list(); + if (s8 !== peg$FAILED) { + s9 = peg$parse__(); + s10 = peg$parsewith_admin_option(); + if (s10 === peg$FAILED) { + s10 = null; + } + peg$savedPos = s0; + s0 = peg$f163(s1, s3, s5, s8, s10); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseelseif_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c159) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e161); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseexpr(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c160) { + s5 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e162); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecrud_stmt(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseSEMICOLON(); + if (s9 === peg$FAILED) { + s9 = null; + } + peg$savedPos = s0; + s0 = peg$f164(s3, s7, s9); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseelseif_stmt_list() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseelseif_stmt(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseelseif_stmt(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseelseif_stmt(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f165(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseif_else_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c0) { + s1 = input.substr(peg$currPos, 2); + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e0); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseexpr(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c160) { + s5 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e162); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecrud_stmt(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseSEMICOLON(); + if (s9 === peg$FAILED) { + s9 = null; + } + s10 = peg$parse__(); + s11 = peg$parseelseif_stmt_list(); + if (s11 === peg$FAILED) { + s11 = null; + } + s12 = peg$parse__(); + s13 = peg$currPos; + s14 = peg$parseKW_ELSE(); + if (s14 !== peg$FAILED) { + s15 = peg$parse__(); + s16 = peg$parsecrud_stmt(); + if (s16 !== peg$FAILED) { + s14 = [s14, s15, s16]; + s13 = s14; + } else { + peg$currPos = s13; + s13 = peg$FAILED; + } + } else { + peg$currPos = s13; + s13 = peg$FAILED; + } + if (s13 === peg$FAILED) { + s13 = null; + } + s14 = peg$parse__(); + s15 = peg$parseSEMICOLON(); + if (s15 === peg$FAILED) { + s15 = null; + } + s16 = peg$parse__(); + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c161) { + s17 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s17 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e163); + } + } + if (s17 !== peg$FAILED) { + s18 = peg$parse__(); + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c0) { + s19 = input.substr(peg$currPos, 2); + peg$currPos += 2; + } else { + s19 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e0); + } + } + if (s19 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f166(s3, s7, s9, s11, s13, s15); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseraise_level() { + var s0; + + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c162) { + s0 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e164); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c163) { + s0 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e165); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c164) { + s0 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e166); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c165) { + s0 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e167); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c166) { + s0 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e168); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c167) { + s0 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e169); + } + } + } + } + } + } + } + + return s0; + } + + function peg$parseraise_opt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13; + + s0 = peg$currPos; + s1 = peg$parseKW_USING(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c168) { + s3 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e170); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c169) { + s3 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e171); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c170) { + s3 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e172); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c171) { + s3 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e173); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c172) { + s3 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e174); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c173) { + s3 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e175); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c174) { + s3 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e176); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c175) { + s3 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e177); + } + } + if (s3 === peg$FAILED) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c2) { + s3 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e2); + } + } + } + } + } + } + } + } + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseKW_ASSIGIN_EQUAL(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseexpr(); + if (s7 !== peg$FAILED) { + s8 = []; + s9 = peg$currPos; + s10 = peg$parse__(); + s11 = peg$parseCOMMA(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parseexpr(); + if (s13 !== peg$FAILED) { + s10 = [s10, s11, s12, s13]; + s9 = s10; + } else { + peg$currPos = s9; + s9 = peg$FAILED; + } + } else { + peg$currPos = s9; + s9 = peg$FAILED; + } + while (s9 !== peg$FAILED) { + s8.push(s9); + s9 = peg$currPos; + s10 = peg$parse__(); + s11 = peg$parseCOMMA(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parseexpr(); + if (s13 !== peg$FAILED) { + s10 = [s10, s11, s12, s13]; + s9 = s10; + } else { + peg$currPos = s9; + s9 = peg$FAILED; + } + } else { + peg$currPos = s9; + s9 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f167(s3, s7, s8); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseraise_item() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseliteral_string(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseproc_primary(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseproc_primary(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f168(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c176) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e178); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseliteral_string(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f169(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseident(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f170(s1); + } + s0 = s1; + } + } + + return s0; + } + + function peg$parseraise_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c177) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e179); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseraise_level(); + if (s3 === peg$FAILED) { + s3 = null; + } + s4 = peg$parse__(); + s5 = peg$parseraise_item(); + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse__(); + s7 = peg$parseraise_opt(); + if (s7 === peg$FAILED) { + s7 = null; + } + peg$savedPos = s0; + s0 = peg$f171(s3, s5, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseexecute_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c103) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e105); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseident(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$currPos; + s6 = peg$parseLPAREN(); + if (s6 !== peg$FAILED) { + s7 = peg$parse__(); + s8 = peg$parseproc_primary_list(); + if (s8 !== peg$FAILED) { + s9 = peg$parse__(); + s10 = peg$parseRPAREN(); + if (s10 !== peg$FAILED) { + s6 = [s6, s7, s8, s9, s10]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f172(s3, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsefor_label() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c109) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e111); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f173(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseident(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c109) { + s3 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e111); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f174(s1); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parsefor_loop_stmt() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18; + + s0 = peg$currPos; + s1 = peg$parsefor_label(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseident(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseKW_IN(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseselect_stmt(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c178) { + s9 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s9 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e180); + } + } + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parsemultiple_stmt(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parseKW_END(); + if (s13 !== peg$FAILED) { + s14 = peg$parse__(); + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c178) { + s15 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s15 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e180); + } + } + if (s15 !== peg$FAILED) { + s16 = peg$parse__(); + s17 = peg$parseident(); + if (s17 === peg$FAILED) { + s17 = null; + } + peg$savedPos = peg$currPos; + s18 = peg$f175(s1, s3, s7, s11, s17); + if (s18) { + s18 = undefined; + } else { + s18 = peg$FAILED; + } + if (s18 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f176(s1, s3, s7, s11, s17); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8806,17 +14473,17 @@ function peg$parse(input, options) { if (s1 !== peg$FAILED) { s2 = peg$parse__(); if (input.charCodeAt(peg$currPos) === 59) { - s3 = peg$c87; + s3 = peg$c179; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e87); + peg$fail(peg$e181); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f91(); + s0 = peg$f177(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8831,12 +14498,12 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 40) { - s2 = peg$c88; + s2 = peg$c180; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e88); + peg$fail(peg$e182); } } if (s2 !== peg$FAILED) { @@ -8845,12 +14512,12 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parse__(); if (input.charCodeAt(peg$currPos) === 41) { - s6 = peg$c89; + s6 = peg$c181; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e89); + peg$fail(peg$e183); } } if (s6 !== peg$FAILED) { @@ -8870,7 +14537,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f92(s1); + s1 = peg$f178(s1); } s0 = s1; } @@ -8927,7 +14594,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f93(s3, s4); + s0 = peg$f179(s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8948,7 +14615,7 @@ function peg$parse(input, options) { s6 = peg$parsecte_definition(); if (s6 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f94(s6); + s0 = peg$f180(s6); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -8993,7 +14660,7 @@ function peg$parse(input, options) { s11 = peg$parseRPAREN(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f95(s1, s3, s9); + s0 = peg$f181(s1, s3, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9031,7 +14698,7 @@ function peg$parse(input, options) { s5 = peg$parseRPAREN(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f96(s3); + s0 = peg$f182(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9067,7 +14734,7 @@ function peg$parse(input, options) { s9 = peg$parseRPAREN(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f97(s1, s3, s7); + s0 = peg$f183(s1, s3, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9095,7 +14762,7 @@ function peg$parse(input, options) { s1 = null; } peg$savedPos = s0; - s1 = peg$f98(s1); + s1 = peg$f184(s1); s0 = s1; } @@ -9206,7 +14873,7 @@ function peg$parse(input, options) { s30 = null; } peg$savedPos = s0; - s0 = peg$f99(s2, s6, s8, s10, s12, s14, s16, s18, s20, s22, s24, s26, s28, s30); + s0 = peg$f185(s2, s6, s8, s10, s12, s14, s16, s18, s20, s22, s24, s26, s28, s30); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9254,7 +14921,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f100(s1, s2); + s0 = peg$f186(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9285,7 +14952,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f101(s1); + s1 = peg$f187(s1); } s0 = s1; @@ -9366,7 +15033,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f102(s1, s2); + s0 = peg$f188(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9414,7 +15081,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f103(s1, s2); + s0 = peg$f189(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9431,13 +15098,16 @@ function peg$parse(input, options) { s1 = peg$parseLBRAKE(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - s3 = peg$parsenumber(); + s3 = peg$parseliteral_numeric(); + if (s3 === peg$FAILED) { + s3 = peg$parseliteral_string(); + } if (s3 !== peg$FAILED) { s4 = peg$parse__(); s5 = peg$parseRBRAKE(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f104(s3); + s0 = peg$f190(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9459,9 +15129,6 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parsebinary_column_expr(); - if (s1 === peg$FAILED) { - s1 = peg$parseexpr(); - } if (s1 !== peg$FAILED) { s2 = peg$parse__(); s3 = peg$parsearray_index(); @@ -9469,31 +15136,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f105(s1, s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseexpr_item_without_union() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - s1 = peg$parsebinary_column_expr(); - if (s1 === peg$FAILED) { - s1 = peg$parse_expr(); - } - if (s1 !== peg$FAILED) { - s2 = peg$parse__(); - s3 = peg$parsearray_index(); - if (s3 === peg$FAILED) { - s3 = null; - } - peg$savedPos = s0; - s0 = peg$f106(s1, s3); + s0 = peg$f191(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9507,12 +15150,12 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 34) { - s1 = peg$c90; + s1 = peg$c182; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s1 === peg$FAILED) { @@ -9521,19 +15164,19 @@ function peg$parse(input, options) { s2 = peg$parsedata_type(); if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s3 = peg$c90; + s3 = peg$c182; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s3 === peg$FAILED) { s3 = null; } peg$savedPos = s0; - s0 = peg$f107(s1, s2, s3); + s0 = peg$f192(s1, s2, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9543,18 +15186,18 @@ function peg$parse(input, options) { } function peg$parsecolumn_list_item() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14; s0 = peg$currPos; s1 = peg$parsestring_constants_escape(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f108(s1); + s1 = peg$f193(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseexpr_item_without_union(); + s1 = peg$parseexpr_item(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); s3 = peg$parseKW_DOUBLE_COLON(); @@ -9562,57 +15205,107 @@ function peg$parse(input, options) { s4 = peg$parse__(); s5 = peg$parsecast_data_type(); if (s5 !== peg$FAILED) { - s6 = []; - s7 = peg$currPos; - s8 = peg$parse__(); - s9 = peg$parseadditive_operator(); + s6 = peg$parse__(); + s7 = []; + s8 = peg$currPos; + s9 = peg$parseDOUBLE_ARROW(); if (s9 === peg$FAILED) { - s9 = peg$parsemultiplicative_operator(); + s9 = peg$parseSINGLE_ARROW(); } if (s9 !== peg$FAILED) { s10 = peg$parse__(); - s11 = peg$parseexpr_item_without_union(); + s11 = peg$parseliteral_string(); + if (s11 === peg$FAILED) { + s11 = peg$parseliteral_numeric(); + } if (s11 !== peg$FAILED) { - s8 = [s8, s9, s10, s11]; - s7 = s8; + s9 = [s9, s10, s11]; + s8 = s9; } else { - peg$currPos = s7; - s7 = peg$FAILED; + peg$currPos = s8; + s8 = peg$FAILED; } } else { - peg$currPos = s7; - s7 = peg$FAILED; + peg$currPos = s8; + s8 = peg$FAILED; } - while (s7 !== peg$FAILED) { - s6.push(s7); - s7 = peg$currPos; - s8 = peg$parse__(); - s9 = peg$parseadditive_operator(); + while (s8 !== peg$FAILED) { + s7.push(s8); + s8 = peg$currPos; + s9 = peg$parseDOUBLE_ARROW(); if (s9 === peg$FAILED) { - s9 = peg$parsemultiplicative_operator(); + s9 = peg$parseSINGLE_ARROW(); } if (s9 !== peg$FAILED) { s10 = peg$parse__(); - s11 = peg$parseexpr_item_without_union(); + s11 = peg$parseliteral_string(); + if (s11 === peg$FAILED) { + s11 = peg$parseliteral_numeric(); + } if (s11 !== peg$FAILED) { - s8 = [s8, s9, s10, s11]; - s7 = s8; + s9 = [s9, s10, s11]; + s8 = s9; } else { - peg$currPos = s7; - s7 = peg$FAILED; + peg$currPos = s8; + s8 = peg$FAILED; } } else { - peg$currPos = s7; - s7 = peg$FAILED; + peg$currPos = s8; + s8 = peg$FAILED; } } - s7 = peg$parse__(); - s8 = peg$parsealias_clause(); - if (s8 === peg$FAILED) { - s8 = null; + s8 = peg$parse__(); + s9 = []; + s10 = peg$currPos; + s11 = peg$parse__(); + s12 = peg$parseadditive_operator(); + if (s12 === peg$FAILED) { + s12 = peg$parsemultiplicative_operator(); + } + if (s12 !== peg$FAILED) { + s13 = peg$parse__(); + s14 = peg$parseexpr_item(); + if (s14 !== peg$FAILED) { + s11 = [s11, s12, s13, s14]; + s10 = s11; + } else { + peg$currPos = s10; + s10 = peg$FAILED; + } + } else { + peg$currPos = s10; + s10 = peg$FAILED; + } + while (s10 !== peg$FAILED) { + s9.push(s10); + s10 = peg$currPos; + s11 = peg$parse__(); + s12 = peg$parseadditive_operator(); + if (s12 === peg$FAILED) { + s12 = peg$parsemultiplicative_operator(); + } + if (s12 !== peg$FAILED) { + s13 = peg$parse__(); + s14 = peg$parseexpr_item(); + if (s14 !== peg$FAILED) { + s11 = [s11, s12, s13, s14]; + s10 = s11; + } else { + peg$currPos = s10; + s10 = peg$FAILED; + } + } else { + peg$currPos = s10; + s10 = peg$FAILED; + } + } + s10 = peg$parse__(); + s11 = peg$parsealias_clause(); + if (s11 === peg$FAILED) { + s11 = null; } peg$savedPos = s0; - s0 = peg$f109(s1, s3, s5, s6, s8); + s0 = peg$f194(s1, s3, s5, s7, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9655,7 +15348,7 @@ function peg$parse(input, options) { s6 = peg$parseSTAR(); if (s6 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f110(s1, s4); + s0 = peg$f195(s1, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9693,7 +15386,7 @@ function peg$parse(input, options) { s3 = peg$parseSTAR(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f111(s1); + s0 = peg$f196(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9708,7 +15401,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = peg$currPos; - s4 = peg$f112(s1, s3); + s4 = peg$f197(s1, s3); if (s4) { s4 = peg$FAILED; } else { @@ -9721,7 +15414,7 @@ function peg$parse(input, options) { s6 = null; } peg$savedPos = s0; - s0 = peg$f113(s1, s3, s6); + s0 = peg$f198(s1, s3, s6); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9732,7 +15425,7 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseexpr_item_without_union(); + s1 = peg$parseexpr_item(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); s3 = peg$parsealias_clause(); @@ -9740,7 +15433,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f114(s1, s3); + s0 = peg$f199(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9766,7 +15459,7 @@ function peg$parse(input, options) { s3 = peg$parsealias_ident(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f115(s3); + s0 = peg$f200(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9785,7 +15478,7 @@ function peg$parse(input, options) { s3 = peg$parsealias_ident(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f116(s3); + s0 = peg$f201(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9804,7 +15497,7 @@ function peg$parse(input, options) { s3 = peg$parseident(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f117(s3); + s0 = peg$f202(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9824,7 +15517,7 @@ function peg$parse(input, options) { s3 = peg$parsevar_decl_list(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f118(s3); + s0 = peg$f203(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9838,23 +15531,23 @@ function peg$parse(input, options) { s1 = peg$parseKW_INTO(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c91) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c183) { s3 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e91); + peg$fail(peg$e185); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c92) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c184) { s3 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e92); + peg$fail(peg$e186); } } } @@ -9868,7 +15561,7 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f119(s3, s5); + s0 = peg$f204(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9892,7 +15585,7 @@ function peg$parse(input, options) { s3 = peg$parsetable_ref_list(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f120(s3); + s0 = peg$f205(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9950,7 +15643,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f121(s1, s2); + s0 = peg$f206(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9972,7 +15665,7 @@ function peg$parse(input, options) { s5 = peg$parsetable_name(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f122(s1, s5); + s0 = peg$f207(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -9996,43 +15689,43 @@ function peg$parse(input, options) { s1 = peg$parseKW_USING(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c93) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c185) { s3 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e93); + peg$fail(peg$e187); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c94) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c186) { s3 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e94); + peg$fail(peg$e188); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c95) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c187) { s3 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e95); + peg$fail(peg$e189); } } if (s3 === peg$FAILED) { - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c96) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c188) { s3 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e96); + peg$fail(peg$e190); } } } @@ -10040,7 +15733,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f123(s3); + s0 = peg$f208(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10098,7 +15791,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f124(s1, s2); + s0 = peg$f209(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10138,7 +15831,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f125(s1, s2); + s0 = peg$f210(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10162,7 +15855,7 @@ function peg$parse(input, options) { s5 = peg$parseliteral_numeric(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f126(s1, s3, s5); + s0 = peg$f211(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10185,7 +15878,7 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f127(s1, s3, s5); + s0 = peg$f212(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10202,24 +15895,24 @@ function peg$parse(input, options) { s0 = peg$parseindex_type(); if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c97) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c189) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e97); + peg$fail(peg$e191); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c98) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c190) { s3 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e98); + peg$fail(peg$e192); } } if (s3 !== peg$FAILED) { @@ -10227,7 +15920,7 @@ function peg$parse(input, options) { s5 = peg$parseident_name(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f128(s5); + s0 = peg$f213(s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10242,29 +15935,29 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c99) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c191) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e99); + peg$fail(peg$e193); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c100) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c192) { s1 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e100); + peg$fail(peg$e194); } } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f129(s1); + s1 = peg$f214(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -10291,7 +15984,7 @@ function peg$parse(input, options) { s3 = peg$parsetable_ref(); } peg$savedPos = s0; - s0 = peg$f130(s1, s2); + s0 = peg$f215(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10311,7 +16004,7 @@ function peg$parse(input, options) { s4 = peg$parsetable_base(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f131(s4); + s0 = peg$f216(s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10326,7 +16019,7 @@ function peg$parse(input, options) { s2 = peg$parsetable_join(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f132(s2); + s0 = peg$f217(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10352,7 +16045,7 @@ function peg$parse(input, options) { s7 = peg$parseLPAREN(); if (s7 !== peg$FAILED) { s8 = peg$parse__(); - s9 = peg$parseident_name(); + s9 = peg$parseident_without_kw(); if (s9 !== peg$FAILED) { s10 = []; s11 = peg$currPos; @@ -10396,7 +16089,7 @@ function peg$parse(input, options) { s12 = peg$parseRPAREN(); if (s12 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f133(s1, s3, s9, s10); + s0 = peg$f218(s1, s3, s9, s10); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10434,7 +16127,7 @@ function peg$parse(input, options) { s5 = null; } peg$savedPos = s0; - s0 = peg$f134(s1, s3, s5); + s0 = peg$f219(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10470,7 +16163,7 @@ function peg$parse(input, options) { s11 = null; } peg$savedPos = s0; - s0 = peg$f135(s1, s5, s9, s11); + s0 = peg$f220(s1, s5, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10500,7 +16193,7 @@ function peg$parse(input, options) { s1 = peg$parseKW_DUAL(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f136(); + s1 = peg$f221(); } s0 = s1; if (s0 === peg$FAILED) { @@ -10513,20 +16206,20 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f137(s1, s3); + s0 = peg$f222(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c101) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c193) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e101); + peg$fail(peg$e195); } } if (s1 === peg$FAILED) { @@ -10550,7 +16243,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f138(s1, s5, s9); + s0 = peg$f223(s1, s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10565,13 +16258,13 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c101) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c193) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e101); + peg$fail(peg$e195); } } if (s1 === peg$FAILED) { @@ -10592,7 +16285,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f139(s1, s5, s9); + s0 = peg$f224(s1, s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10607,13 +16300,13 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c101) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c193) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e101); + peg$fail(peg$e195); } } if (s1 === peg$FAILED) { @@ -10628,7 +16321,7 @@ function peg$parse(input, options) { s5 = null; } peg$savedPos = s0; - s0 = peg$f140(s1, s3, s5); + s0 = peg$f225(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10638,13 +16331,13 @@ function peg$parse(input, options) { s1 = peg$parsetable_name(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c102) { + if (input.substr(peg$currPos, 11).toLowerCase() === peg$c194) { s3 = input.substr(peg$currPos, 11); peg$currPos += 11; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e102); + peg$fail(peg$e196); } } if (s3 !== peg$FAILED) { @@ -10653,13 +16346,13 @@ function peg$parse(input, options) { if (s5 !== peg$FAILED) { s6 = peg$parse__(); s7 = peg$currPos; - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c103) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c195) { s8 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { s8 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e103); + peg$fail(peg$e197); } } if (s8 !== peg$FAILED) { @@ -10699,7 +16392,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f141(s1, s5, s7, s9); + s0 = peg$f226(s1, s5, s7, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10722,7 +16415,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f142(s1, s3); + s0 = peg$f227(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10752,7 +16445,7 @@ function peg$parse(input, options) { s5 = peg$parseKW_JOIN(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f143(); + s0 = peg$f228(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10774,7 +16467,7 @@ function peg$parse(input, options) { s5 = peg$parseKW_JOIN(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f144(); + s0 = peg$f229(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10796,7 +16489,7 @@ function peg$parse(input, options) { s5 = peg$parseKW_JOIN(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f145(); + s0 = peg$f230(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10807,13 +16500,13 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c104) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c196) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e104); + peg$fail(peg$e198); } } if (s1 !== peg$FAILED) { @@ -10821,7 +16514,7 @@ function peg$parse(input, options) { s3 = peg$parseKW_JOIN(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f146(); + s0 = peg$f231(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10848,7 +16541,7 @@ function peg$parse(input, options) { s2 = peg$parseKW_JOIN(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f147(); + s0 = peg$f232(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -10873,6 +16566,9 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$parse__(); s6 = peg$parseident(); + if (s6 === peg$FAILED) { + s6 = peg$parseSTAR(); + } if (s6 !== peg$FAILED) { s3 = [s3, s4, s5, s6]; s2 = s3; @@ -10884,103 +16580,46 @@ function peg$parse(input, options) { peg$currPos = s2; s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - s4 = peg$parse__(); - s5 = peg$parseDOT(); - if (s5 !== peg$FAILED) { - s6 = peg$parse__(); - s7 = peg$parseident(); - if (s7 !== peg$FAILED) { - s4 = [s4, s5, s6, s7]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } + if (s2 === peg$FAILED) { + s2 = null; + } + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseDOT(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseident(); + if (s7 === peg$FAILED) { + s7 = peg$parseSTAR(); + } + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; } else { peg$currPos = s3; s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f148(s1, s2, s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } } else { - peg$currPos = s0; - s0 = peg$FAILED; + peg$currPos = s3; + s3 = peg$FAILED; } + if (s3 === peg$FAILED) { + s3 = null; + } + peg$savedPos = s0; + s0 = peg$f233(s1, s2, s3); } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseident(); + s1 = peg$parsevar_decl(); if (s1 !== peg$FAILED) { - s2 = peg$parse__(); - s3 = peg$parseDOT(); - if (s3 !== peg$FAILED) { - s4 = peg$parse__(); - s5 = peg$parseSTAR(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f149(s1); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseident(); - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$parse__(); - s4 = peg$parseDOT(); - if (s4 !== peg$FAILED) { - s5 = peg$parse__(); - s6 = peg$parseident(); - if (s6 !== peg$FAILED) { - s3 = [s3, s4, s5, s6]; - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 === peg$FAILED) { - s2 = null; - } - peg$savedPos = s0; - s0 = peg$f150(s1, s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsevar_decl(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f151(s1); - } - s0 = s1; - } + peg$savedPos = s0; + s1 = peg$f234(s1); } + s0 = s1; } return s0; @@ -10996,7 +16635,7 @@ function peg$parse(input, options) { s3 = peg$parseor_and_where_expr(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f152(s3); + s0 = peg$f235(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11019,7 +16658,7 @@ function peg$parse(input, options) { s3 = peg$parseor_and_where_expr(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f153(s3); + s0 = peg$f236(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11045,7 +16684,7 @@ function peg$parse(input, options) { s5 = peg$parseexpr_list(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f154(s5); + s0 = peg$f237(s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11107,7 +16746,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f155(s1, s2); + s0 = peg$f238(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11126,7 +16765,7 @@ function peg$parse(input, options) { s3 = peg$parseor_and_where_expr(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f156(s3); + s0 = peg$f239(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11149,7 +16788,7 @@ function peg$parse(input, options) { s3 = peg$parsenamed_window_expr_list(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f157(s3); + s0 = peg$f240(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11207,7 +16846,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f158(s1, s2); + s0 = peg$f241(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11229,7 +16868,7 @@ function peg$parse(input, options) { s5 = peg$parseas_window_specification(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f159(s1, s5); + s0 = peg$f242(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11260,7 +16899,7 @@ function peg$parse(input, options) { s5 = peg$parseRPAREN(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f160(s3); + s0 = peg$f243(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11293,7 +16932,7 @@ function peg$parse(input, options) { s5 = null; } peg$savedPos = s0; - s0 = peg$f161(s1, s3, s5); + s0 = peg$f244(s1, s3, s5); return s0; } @@ -11312,7 +16951,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f162(s1, s3); + s0 = peg$f245(s1, s3); return s0; } @@ -11330,7 +16969,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f163(s1, s3); + s0 = peg$f246(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11356,7 +16995,7 @@ function peg$parse(input, options) { s9 = peg$parsewindow_frame_following(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f164(s5, s9); + s0 = peg$f247(s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11389,18 +17028,18 @@ function peg$parse(input, options) { s1 = peg$parsewindow_frame_value(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c105) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c197) { s3 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e105); + peg$fail(peg$e199); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f165(s1); + s0 = peg$f248(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11423,18 +17062,18 @@ function peg$parse(input, options) { s1 = peg$parsewindow_frame_value(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c106) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c198) { s3 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e106); + peg$fail(peg$e200); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f166(s1); + s0 = peg$f249(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11454,29 +17093,29 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c107) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c48) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e107); + peg$fail(peg$e50); } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c58) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c111) { s3 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e58); + peg$fail(peg$e113); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f167(); + s0 = peg$f250(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11493,18 +17132,18 @@ function peg$parse(input, options) { var s0, s1; s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c108) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c199) { s1 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e108); + peg$fail(peg$e201); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f168(s1); + s1 = peg$f251(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -11527,7 +17166,7 @@ function peg$parse(input, options) { s5 = peg$parsecolumn_clause(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f169(s5); + s0 = peg$f252(s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11557,7 +17196,7 @@ function peg$parse(input, options) { s5 = peg$parseorder_by_list(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f170(s5); + s0 = peg$f253(s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11619,7 +17258,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f171(s1, s2); + s0 = peg$f254(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11644,34 +17283,34 @@ function peg$parse(input, options) { } s4 = peg$parse__(); s5 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c13) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c61) { s6 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e13); + peg$fail(peg$e63); } } if (s6 !== peg$FAILED) { s7 = peg$parse__(); - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c14) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c62) { s8 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s8 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e14); + peg$fail(peg$e64); } } if (s8 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c15) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c63) { s8 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s8 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e15); + peg$fail(peg$e65); } } } @@ -11688,7 +17327,7 @@ function peg$parse(input, options) { s5 = null; } peg$savedPos = s0; - s0 = peg$f172(s1, s3, s5); + s0 = peg$f255(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11758,7 +17397,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f173(s1, s3); + s0 = peg$f256(s1, s3); return s0; } @@ -11800,7 +17439,7 @@ function peg$parse(input, options) { s16 = null; } peg$savedPos = s0; - s0 = peg$f174(s2, s6, s10, s12, s14, s16); + s0 = peg$f257(s2, s6, s10, s12, s14, s16); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11841,7 +17480,7 @@ function peg$parse(input, options) { s7 = null; } peg$savedPos = s0; - s0 = peg$f175(s3, s5, s7); + s0 = peg$f258(s3, s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11899,7 +17538,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f176(s1, s2); + s0 = peg$f259(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11936,12 +17575,12 @@ function peg$parse(input, options) { if (s3 !== peg$FAILED) { s4 = peg$parse__(); if (input.charCodeAt(peg$currPos) === 61) { - s5 = peg$c109; + s5 = peg$c47; peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e109); + peg$fail(peg$e49); } } if (s5 !== peg$FAILED) { @@ -11949,7 +17588,7 @@ function peg$parse(input, options) { s7 = peg$parseadditive_expr(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f177(s1, s3, s7); + s0 = peg$f260(s1, s3, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -11988,12 +17627,12 @@ function peg$parse(input, options) { if (s3 !== peg$FAILED) { s4 = peg$parse__(); if (input.charCodeAt(peg$currPos) === 61) { - s5 = peg$c109; + s5 = peg$c47; peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e109); + peg$fail(peg$e49); } } if (s5 !== peg$FAILED) { @@ -12010,7 +17649,7 @@ function peg$parse(input, options) { s13 = peg$parseRPAREN(); if (s13 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f178(s1, s3, s11); + s0 = peg$f261(s1, s3, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12040,38 +17679,6 @@ function peg$parse(input, options) { return s0; } - function peg$parseconflict_stmt() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$parseKW_ON(); - if (s1 !== peg$FAILED) { - s2 = peg$parse__(); - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c110) { - s3 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e110); - } - } - if (s3 !== peg$FAILED) { - s4 = peg$parse__(); - s1 = [s1, s2, s3, s4]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - function peg$parsereturning_stmt() { var s0, s1, s2, s3; @@ -12085,7 +17692,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f179(s1, s3); + s0 = peg$f262(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12163,7 +17770,7 @@ function peg$parse(input, options) { s8 = peg$parseRPAREN(); if (s8 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f180(s5, s6); + s0 = peg$f263(s5, s6); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12188,7 +17795,7 @@ function peg$parse(input, options) { s3 = peg$parsevalue_item(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f181(s3); + s0 = peg$f264(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12202,8 +17809,165 @@ function peg$parse(input, options) { return s0; } + function peg$parseconflict_target() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseLPAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parsecolumn_ref_list(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseRPAREN(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f265(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseconflict_action() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c200) { + s1 = input.substr(peg$currPos, 2); + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e202); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c201) { + s3 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e203); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f266(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c200) { + s1 = input.substr(peg$currPos, 2); + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e202); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseKW_UPDATE(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseKW_SET(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseset_list(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parsewhere_clause(); + if (s9 === peg$FAILED) { + s9 = null; + } + peg$savedPos = s0; + s0 = peg$f267(s7, s9); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseon_conflict() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseKW_ON(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c202) { + s3 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e204); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseconflict_target(); + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse__(); + s7 = peg$parseconflict_action(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f268(s5, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsereplace_insert_stmt() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17; + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19; s0 = peg$currPos; s1 = peg$parsereplace_insert(); @@ -12234,12 +17998,17 @@ function peg$parse(input, options) { s15 = peg$parseinsert_value_clause(); if (s15 !== peg$FAILED) { s16 = peg$parse__(); - s17 = peg$parsereturning_stmt(); + s17 = peg$parseon_conflict(); if (s17 === peg$FAILED) { s17 = null; } + s18 = peg$parse__(); + s19 = peg$parsereturning_stmt(); + if (s19 === peg$FAILED) { + s19 = null; + } peg$savedPos = s0; - s0 = peg$f182(s1, s5, s7, s11, s15, s17); + s0 = peg$f269(s1, s5, s7, s11, s15, s17, s19); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12301,7 +18070,7 @@ function peg$parse(input, options) { s13 = null; } peg$savedPos = s0; - s0 = peg$f183(s1, s3, s5, s7, s9, s11, s13); + s0 = peg$f270(s1, s3, s5, s7, s9, s11, s13); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12325,7 +18094,7 @@ function peg$parse(input, options) { s1 = peg$parseKW_INSERT(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f184(); + s1 = peg$f271(); } s0 = s1; if (s0 === peg$FAILED) { @@ -12333,7 +18102,7 @@ function peg$parse(input, options) { s1 = peg$parseKW_REPLACE(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f185(); + s1 = peg$f272(); } s0 = s1; } @@ -12351,7 +18120,7 @@ function peg$parse(input, options) { s3 = peg$parsevalue_list(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f186(s3); + s0 = peg$f273(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12409,7 +18178,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f187(s1, s2); + s0 = peg$f274(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12431,7 +18200,7 @@ function peg$parse(input, options) { s5 = peg$parseRPAREN(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f188(s3); + s0 = peg$f275(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12452,7 +18221,7 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; - s1 = peg$parseexpr_item(); + s1 = peg$parseexpr(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; @@ -12460,7 +18229,7 @@ function peg$parse(input, options) { s5 = peg$parseCOMMA(); if (s5 !== peg$FAILED) { s6 = peg$parse__(); - s7 = peg$parseexpr_item(); + s7 = peg$parseexpr(); if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -12479,7 +18248,7 @@ function peg$parse(input, options) { s5 = peg$parseCOMMA(); if (s5 !== peg$FAILED) { s6 = peg$parse__(); - s7 = peg$parseexpr_item(); + s7 = peg$parseexpr(); if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -12493,7 +18262,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f189(s1, s2); + s0 = peg$f276(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12515,7 +18284,7 @@ function peg$parse(input, options) { s5 = peg$parseinterval_unit(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f190(s3, s5); + s0 = peg$f277(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12536,7 +18305,7 @@ function peg$parse(input, options) { s3 = peg$parseliteral_string(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f191(s3); + s0 = peg$f278(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12573,7 +18342,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f192(s3, s5); + s0 = peg$f279(s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12610,7 +18379,7 @@ function peg$parse(input, options) { s11 = null; } peg$savedPos = s0; - s0 = peg$f193(s3, s5, s7); + s0 = peg$f280(s3, s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12664,7 +18433,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f194(s1, s3); + s0 = peg$f281(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12689,7 +18458,7 @@ function peg$parse(input, options) { s7 = peg$parseexpr(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f195(s3, s7); + s0 = peg$f282(s3, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12720,7 +18489,7 @@ function peg$parse(input, options) { s3 = peg$parseexpr(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f196(s3); + s0 = peg$f283(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12813,7 +18582,7 @@ function peg$parse(input, options) { s4 = null; } peg$savedPos = s0; - s0 = peg$f197(s1, s2, s4); + s0 = peg$f284(s1, s2, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12862,7 +18631,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f198(s1, s2); + s0 = peg$f285(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -12879,7 +18648,7 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; - s1 = peg$parse_expr(); + s1 = peg$parseexpr(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; @@ -12893,7 +18662,7 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { s6 = peg$parse__(); - s7 = peg$parse_expr(); + s7 = peg$parseexpr(); if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -12905,43 +18674,34 @@ function peg$parse(input, options) { peg$currPos = s3; s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parse__(); - s5 = peg$parseKW_AND(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseKW_AND(); + if (s5 === peg$FAILED) { + s5 = peg$parseKW_OR(); if (s5 === peg$FAILED) { - s5 = peg$parseKW_OR(); - if (s5 === peg$FAILED) { - s5 = peg$parseLOGIC_OPERATOR(); - } + s5 = peg$parseLOGIC_OPERATOR(); } - if (s5 !== peg$FAILED) { - s6 = peg$parse__(); - s7 = peg$parse_expr(); - if (s7 !== peg$FAILED) { - s4 = [s4, s5, s6, s7]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } + } + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseexpr(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; } else { peg$currPos = s3; s3 = peg$FAILED; } + } else { + peg$currPos = s3; + s3 = peg$FAILED; } - } else { - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f199(s1, s2); - } else { - peg$currPos = s0; - s0 = peg$FAILED; } + peg$savedPos = s0; + s0 = peg$f286(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13007,7 +18767,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f200(s1, s2); + s0 = peg$f287(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13071,7 +18831,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f201(s1, s2); + s0 = peg$f288(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13135,7 +18895,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f202(s1, s2); + s0 = peg$f289(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13156,24 +18916,24 @@ function peg$parse(input, options) { if (s1 === peg$FAILED) { s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 33) { - s2 = peg$c111; + s2 = peg$c203; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e111); + peg$fail(peg$e205); } } if (s2 !== peg$FAILED) { s3 = peg$currPos; peg$silentFails++; if (input.charCodeAt(peg$currPos) === 61) { - s4 = peg$c109; + s4 = peg$c47; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e109); + peg$fail(peg$e49); } } peg$silentFails--; @@ -13200,7 +18960,7 @@ function peg$parse(input, options) { s3 = peg$parsenot_expr(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f203(s3); + s0 = peg$f290(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13227,7 +18987,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f204(s1, s3); + s0 = peg$f291(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13258,7 +19018,7 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f205(s1, s5); + s0 = peg$f292(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13301,7 +19061,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f206(s1); + s1 = peg$f293(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -13325,6 +19085,9 @@ function peg$parse(input, options) { s0 = peg$parselike_op_right(); if (s0 === peg$FAILED) { s0 = peg$parsejsonb_op_right(); + if (s0 === peg$FAILED) { + s0 = peg$parseregex_op_right(); + } } } } @@ -13382,7 +19145,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f207(s1); + s1 = peg$f294(s1); } s0 = s1; @@ -13392,73 +19155,73 @@ function peg$parse(input, options) { function peg$parsearithmetic_comparison_operator() { var s0; - if (input.substr(peg$currPos, 2) === peg$c112) { - s0 = peg$c112; + if (input.substr(peg$currPos, 2) === peg$c204) { + s0 = peg$c204; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e112); + peg$fail(peg$e206); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 62) { - s0 = peg$c113; + s0 = peg$c205; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e113); + peg$fail(peg$e207); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c114) { - s0 = peg$c114; + if (input.substr(peg$currPos, 2) === peg$c206) { + s0 = peg$c206; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e114); + peg$fail(peg$e208); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c115) { - s0 = peg$c115; + if (input.substr(peg$currPos, 2) === peg$c207) { + s0 = peg$c207; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e115); + peg$fail(peg$e209); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 60) { - s0 = peg$c116; + s0 = peg$c208; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e116); + peg$fail(peg$e210); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { - s0 = peg$c109; + s0 = peg$c47; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e109); + peg$fail(peg$e49); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c117) { - s0 = peg$c117; + if (input.substr(peg$currPos, 2) === peg$c209) { + s0 = peg$c209; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e117); + peg$fail(peg$e211); } } } @@ -13481,7 +19244,7 @@ function peg$parse(input, options) { s3 = peg$parseadditive_expr(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f208(s3); + s0 = peg$f295(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13520,7 +19283,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f209(s3); + s0 = peg$f296(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13552,7 +19315,7 @@ function peg$parse(input, options) { s3 = peg$parseadditive_expr(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f210(s3); + s0 = peg$f297(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13583,7 +19346,7 @@ function peg$parse(input, options) { s7 = peg$parseadditive_expr(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f211(s1, s3, s7); + s0 = peg$f298(s1, s3, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13626,7 +19389,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f212(s1); + s1 = peg$f299(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -13661,7 +19424,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f213(s1); + s1 = peg$f300(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -13670,13 +19433,13 @@ function peg$parse(input, options) { s0 = peg$parseKW_ILIKE(); if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c118) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c210) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e118); + peg$fail(peg$e212); } } if (s1 !== peg$FAILED) { @@ -13684,7 +19447,7 @@ function peg$parse(input, options) { s3 = peg$parseKW_TO(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f214(); + s0 = peg$f301(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13698,13 +19461,13 @@ function peg$parse(input, options) { s1 = peg$parseKW_NOT(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c118) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c210) { s3 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e118); + peg$fail(peg$e212); } } if (s3 !== peg$FAILED) { @@ -13712,7 +19475,7 @@ function peg$parse(input, options) { s5 = peg$parseKW_TO(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f215(); + s0 = peg$f302(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13733,17 +19496,92 @@ function peg$parse(input, options) { return s0; } + function peg$parseregex_op() { + var s0; + + if (input.substr(peg$currPos, 3) === peg$c211) { + s0 = peg$c211; + peg$currPos += 3; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e213); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c212) { + s0 = peg$c212; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e214); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 126) { + s0 = peg$c213; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e215); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c214) { + s0 = peg$c214; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e216); + } + } + } + } + } + + return s0; + } + + function peg$parseregex_op_right() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseregex_op(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseliteral(); + if (s3 === peg$FAILED) { + s3 = peg$parsecomparison_expr(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f303(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parseescape_op() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c119) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c215) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e119); + peg$fail(peg$e217); } } if (s1 !== peg$FAILED) { @@ -13751,7 +19589,7 @@ function peg$parse(input, options) { s3 = peg$parseliteral_string(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f216(s1, s3); + s0 = peg$f304(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13786,7 +19624,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f217(s1); + s1 = peg$f305(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -13814,7 +19652,7 @@ function peg$parse(input, options) { s5 = null; } peg$savedPos = s0; - s0 = peg$f218(s1, s3, s5); + s0 = peg$f306(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13843,7 +19681,7 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f219(s1, s5); + s0 = peg$f307(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13871,7 +19709,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f220(s1, s3); + s0 = peg$f308(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -13889,23 +19727,23 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c120) { - s1 = peg$c120; + if (input.substr(peg$currPos, 2) === peg$c216) { + s1 = peg$c216; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e120); + peg$fail(peg$e218); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c121) { - s1 = peg$c121; + if (input.substr(peg$currPos, 2) === peg$c217) { + s1 = peg$c217; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e121); + peg$fail(peg$e219); } } if (s1 === peg$FAILED) { @@ -13916,42 +19754,42 @@ function peg$parse(input, options) { s1 = peg$parseWELL_ARROW(); if (s1 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 63) { - s1 = peg$c122; + s1 = peg$c218; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e122); + peg$fail(peg$e220); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c123) { - s1 = peg$c123; + if (input.substr(peg$currPos, 2) === peg$c219) { + s1 = peg$c219; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e123); + peg$fail(peg$e221); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c124) { - s1 = peg$c124; + if (input.substr(peg$currPos, 2) === peg$c220) { + s1 = peg$c220; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e124); + peg$fail(peg$e222); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c125) { - s1 = peg$c125; + if (input.substr(peg$currPos, 2) === peg$c221) { + s1 = peg$c221; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e125); + peg$fail(peg$e223); } } } @@ -13967,7 +19805,7 @@ function peg$parse(input, options) { s3 = peg$parsecolumn_list_item(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f221(s1, s3); + s0 = peg$f309(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14025,7 +19863,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f222(s1, s2); + s0 = peg$f310(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14038,22 +19876,22 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 43) { - s0 = peg$c126; + s0 = peg$c222; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e126); + peg$fail(peg$e224); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 45) { - s0 = peg$c127; + s0 = peg$c223; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e127); + peg$fail(peg$e225); } } } @@ -14106,7 +19944,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f223(s1, s2); + s0 = peg$f311(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14119,42 +19957,42 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 42) { - s0 = peg$c128; + s0 = peg$c224; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e128); + peg$fail(peg$e226); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 47) { - s0 = peg$c129; + s0 = peg$c225; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e129); + peg$fail(peg$e227); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 37) { - s0 = peg$c130; + s0 = peg$c226; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e130); + peg$fail(peg$e228); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c131) { - s0 = peg$c131; + if (input.substr(peg$currPos, 2) === peg$c227) { + s0 = peg$c227; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e131); + peg$fail(peg$e229); } } } @@ -14164,130 +20002,109 @@ function peg$parse(input, options) { return s0; } + function peg$parsecolumn_ref_array_index() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parsecolumn_ref(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parsearray_index(); + if (s3 === peg$FAILED) { + s3 = null; + } + peg$savedPos = s0; + s0 = peg$f312(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parseprimary() { var s0, s1, s2, s3, s4, s5; s0 = peg$parsecast_expr(); if (s0 === peg$FAILED) { - s0 = peg$parseliteral(); + s0 = peg$currPos; + s1 = peg$parseLPAREN(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseor_and_where_expr(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseRPAREN(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f313(s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } if (s0 === peg$FAILED) { - s0 = peg$parseaggr_func(); + s0 = peg$parsevar_decl(); if (s0 === peg$FAILED) { - s0 = peg$parsewindow_func(); - if (s0 === peg$FAILED) { - s0 = peg$parsefunc_call(); - if (s0 === peg$FAILED) { - s0 = peg$parsecase_expr(); - if (s0 === peg$FAILED) { - s0 = peg$parseinterval_expr(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsecolumn_ref(); - if (s1 !== peg$FAILED) { - s2 = peg$parse__(); - s3 = peg$parsearray_index(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f224(s1, s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parsecolumn_ref(); - if (s0 === peg$FAILED) { - s0 = peg$parseparam(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseLPAREN(); - if (s1 !== peg$FAILED) { - s2 = peg$parse__(); - s3 = peg$parseor_and_where_expr(); - if (s3 !== peg$FAILED) { - s4 = peg$parse__(); - s5 = peg$parseRPAREN(); - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f225(s3); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parsevar_decl(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parse__(); - if (input.charCodeAt(peg$currPos) === 36) { - s2 = peg$c132; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e132); - } - } - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 60) { - s3 = peg$c116; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e116); - } - } - if (s3 !== peg$FAILED) { - s4 = peg$parseliteral_numeric(); - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 62) { - s5 = peg$c113; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e113); - } - } - if (s5 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f226(s2, s4); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - } - } - } - } + s0 = peg$currPos; + s1 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 36) { + s2 = peg$c228; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e230); + } + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 60) { + s3 = peg$c208; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e210); } } + if (s3 !== peg$FAILED) { + s4 = peg$parseliteral_numeric(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 62) { + s5 = peg$c205; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e207); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f314(s2, s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; } } } @@ -14300,23 +20117,23 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6; s0 = peg$currPos; - if (input.substr(peg$currPos, 1).toLowerCase() === peg$c133) { + if (input.substr(peg$currPos, 1).toLowerCase() === peg$c229) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e133); + peg$fail(peg$e231); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 39) { - s2 = peg$c71; + s2 = peg$c124; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s2 !== peg$FAILED) { @@ -14329,17 +20146,17 @@ function peg$parse(input, options) { } s5 = peg$parse__(); if (input.charCodeAt(peg$currPos) === 39) { - s6 = peg$c71; + s6 = peg$c124; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s6 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f227(s4); + s0 = peg$f315(s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14385,7 +20202,7 @@ function peg$parse(input, options) { s3 = peg$parseSTAR(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f228(s1); + s0 = peg$f316(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14469,7 +20286,7 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f229(s1, s3, s5); + s0 = peg$f317(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14519,7 +20336,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f230(s1, s2, s3); + s0 = peg$f318(s1, s2, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14543,7 +20360,7 @@ function peg$parse(input, options) { s5 = peg$parsecolumn(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f231(s1, s5); + s0 = peg$f319(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14561,7 +20378,7 @@ function peg$parse(input, options) { s1 = peg$parsecolumn(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f232(s1); + s1 = peg$f320(s1); } s0 = s1; } @@ -14618,7 +20435,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f233(s1, s2); + s0 = peg$f321(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14634,7 +20451,7 @@ function peg$parse(input, options) { s1 = peg$parseident_name(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$f234(s1); + s2 = peg$f322(s1); if (s2) { s2 = peg$FAILED; } else { @@ -14642,7 +20459,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f235(s1); + s0 = peg$f323(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14656,7 +20473,7 @@ function peg$parse(input, options) { s1 = peg$parsequoted_ident(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f236(s1); + s1 = peg$f324(s1); } s0 = s1; } @@ -14664,43 +20481,103 @@ function peg$parse(input, options) { return s0; } + function peg$parseident_list() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parseident(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseident(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseCOMMA(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parseident(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f325(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsealias_ident() { - var s0, s1, s2, s3, s4, s5, s6, s7, s8; + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; s1 = peg$parseident_name(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$f237(s1); + s2 = peg$f326(s1); if (s2) { s2 = peg$FAILED; } else { s2 = undefined; } if (s2 !== peg$FAILED) { - s3 = peg$parse__(); - s4 = peg$parseLPAREN(); - if (s4 !== peg$FAILED) { - s5 = peg$parse__(); - s6 = peg$parsecolumn_list(); - if (s6 !== peg$FAILED) { - s7 = peg$parse__(); - s8 = peg$parseRPAREN(); - if (s8 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f238(s1, s6); + s3 = peg$currPos; + s4 = peg$parse__(); + s5 = peg$parseLPAREN(); + if (s5 !== peg$FAILED) { + s6 = peg$parse__(); + s7 = peg$parsecolumn_list(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseRPAREN(); + if (s9 !== peg$FAILED) { + s4 = [s4, s5, s6, s7, s8, s9]; + s3 = s4; } else { - peg$currPos = s0; - s0 = peg$FAILED; + peg$currPos = s3; + s3 = peg$FAILED; } } else { - peg$currPos = s0; - s0 = peg$FAILED; + peg$currPos = s3; + s3 = peg$FAILED; } } else { - peg$currPos = s0; - s0 = peg$FAILED; + peg$currPos = s3; + s3 = peg$FAILED; } + if (s3 === peg$FAILED) { + s3 = null; + } + peg$savedPos = s0; + s0 = peg$f327(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14711,35 +20588,12 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseident_name(); + s1 = peg$parsequoted_ident(); if (s1 !== peg$FAILED) { - peg$savedPos = peg$currPos; - s2 = peg$f239(s1); - if (s2) { - s2 = peg$FAILED; - } else { - s2 = undefined; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f240(s1); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsequoted_ident(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f241(s1); - } - s0 = s1; + peg$savedPos = s0; + s1 = peg$f328(s1); } + s0 = s1; } return s0; @@ -14764,35 +20618,35 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 34) { - s1 = peg$c90; + s1 = peg$c182; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s1 !== peg$FAILED) { s2 = []; - if (peg$r0.test(input.charAt(peg$currPos))) { + if (peg$r2.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e134); + peg$fail(peg$e232); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$r0.test(input.charAt(peg$currPos))) { + if (peg$r2.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e134); + peg$fail(peg$e232); } } } @@ -14801,17 +20655,17 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s3 = peg$c90; + s3 = peg$c182; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f242(s2); + s0 = peg$f329(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14833,35 +20687,35 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 39) { - s1 = peg$c71; + s1 = peg$c124; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s1 !== peg$FAILED) { s2 = []; - if (peg$r1.test(input.charAt(peg$currPos))) { + if (peg$r3.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e135); + peg$fail(peg$e233); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$r1.test(input.charAt(peg$currPos))) { + if (peg$r3.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e135); + peg$fail(peg$e233); } } } @@ -14870,17 +20724,17 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 39) { - s3 = peg$c71; + s3 = peg$c124; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f243(s2); + s0 = peg$f330(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14902,35 +20756,35 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 96) { - s1 = peg$c134; + s1 = peg$c230; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e136); + peg$fail(peg$e234); } } if (s1 !== peg$FAILED) { s2 = []; - if (peg$r2.test(input.charAt(peg$currPos))) { + if (peg$r4.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e137); + peg$fail(peg$e235); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$r2.test(input.charAt(peg$currPos))) { + if (peg$r4.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e137); + peg$fail(peg$e235); } } } @@ -14939,17 +20793,17 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 96) { - s3 = peg$c134; + s3 = peg$c230; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e136); + peg$fail(peg$e234); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f244(s2); + s0 = peg$f331(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -14984,7 +20838,7 @@ function peg$parse(input, options) { s1 = peg$parsecolumn_name(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; - s2 = peg$f245(s1); + s2 = peg$f332(s1); if (s2) { s2 = peg$FAILED; } else { @@ -14992,7 +20846,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f246(s1); + s0 = peg$f333(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15021,7 +20875,7 @@ function peg$parse(input, options) { s3 = peg$parsecolumn_part(); } peg$savedPos = s0; - s0 = peg$f247(s1, s2); + s0 = peg$f334(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15043,7 +20897,7 @@ function peg$parse(input, options) { s3 = peg$parseident_part(); } peg$savedPos = s0; - s0 = peg$f248(s1, s2); + s0 = peg$f335(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15055,13 +20909,13 @@ function peg$parse(input, options) { function peg$parseident_start() { var s0; - if (peg$r3.test(input.charAt(peg$currPos))) { + if (peg$r5.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e138); + peg$fail(peg$e236); } } @@ -15071,13 +20925,13 @@ function peg$parse(input, options) { function peg$parseident_part() { var s0; - if (peg$r4.test(input.charAt(peg$currPos))) { + if (peg$r6.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e139); + peg$fail(peg$e237); } } @@ -15087,13 +20941,13 @@ function peg$parse(input, options) { function peg$parsecolumn_part() { var s0; - if (peg$r5.test(input.charAt(peg$currPos))) { + if (peg$r7.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e140); + peg$fail(peg$e238); } } @@ -15106,12 +20960,12 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 58) { - s2 = peg$c135; + s2 = peg$c231; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e141); + peg$fail(peg$e239); } } if (s2 !== peg$FAILED) { @@ -15129,7 +20983,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f249(s1); + s1 = peg$f336(s1); } s0 = s1; @@ -15160,7 +21014,7 @@ function peg$parse(input, options) { s11 = peg$parseRPAREN(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f250(s5, s9); + s0 = peg$f337(s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15192,7 +21046,7 @@ function peg$parse(input, options) { s5 = peg$parseKW_CURRENT_TIMESTAMP(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f251(s5); + s0 = peg$f338(s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15214,13 +21068,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c136) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c232) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e142); + peg$fail(peg$e240); } } if (s1 !== peg$FAILED) { @@ -15228,7 +21082,7 @@ function peg$parse(input, options) { s3 = peg$parseas_window_specification(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f252(s3); + s0 = peg$f339(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15239,13 +21093,13 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c136) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c232) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e142); + peg$fail(peg$e240); } } if (s1 !== peg$FAILED) { @@ -15266,7 +21120,7 @@ function peg$parse(input, options) { s9 = peg$parseRPAREN(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f253(s5, s7); + s0 = peg$f340(s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15291,13 +21145,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c137) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c233) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e143); + peg$fail(peg$e241); } } if (s1 !== peg$FAILED) { @@ -15311,7 +21165,7 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f254(s5); + s0 = peg$f341(s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15350,7 +21204,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f255(s1, s3); + s0 = peg$f342(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15389,7 +21243,7 @@ function peg$parse(input, options) { s7 = peg$parseover_partition(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f256(s1, s7); + s0 = peg$f343(s1, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15434,7 +21288,7 @@ function peg$parse(input, options) { s11 = peg$parseover_partition(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f257(s1, s5, s9, s11); + s0 = peg$f344(s1, s5, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15483,7 +21337,7 @@ function peg$parse(input, options) { s11 = peg$parseover_partition(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f258(s1, s5, s7, s11); + s0 = peg$f345(s1, s5, s7, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15511,23 +21365,23 @@ function peg$parse(input, options) { function peg$parseKW_FIRST_LAST_VALUE() { var s0; - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c138) { + if (input.substr(peg$currPos, 11).toLowerCase() === peg$c234) { s0 = input.substr(peg$currPos, 11); peg$currPos += 11; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e144); + peg$fail(peg$e242); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c139) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c235) { s0 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e145); + peg$fail(peg$e243); } } } @@ -15538,33 +21392,33 @@ function peg$parse(input, options) { function peg$parseKW_WIN_FNS_RANK() { var s0; - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c140) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c236) { s0 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e146); + peg$fail(peg$e244); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c141) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c237) { s0 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e147); + peg$fail(peg$e245); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c142) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c238) { s0 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e148); + peg$fail(peg$e246); } } } @@ -15576,33 +21430,33 @@ function peg$parse(input, options) { function peg$parseKW_LAG_LEAD() { var s0; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c143) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c239) { s0 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e149); + peg$fail(peg$e247); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c144) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c240) { s0 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e150); + peg$fail(peg$e248); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c145) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c241) { s0 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e151); + peg$fail(peg$e249); } } } @@ -15615,40 +21469,40 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c146) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c242) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e152); + peg$fail(peg$e250); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c147) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c243) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e153); + peg$fail(peg$e251); } } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c13) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c61) { s3 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e13); + peg$fail(peg$e63); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f259(s1); + s0 = peg$f346(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15682,7 +21536,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f260(s1, s5, s9); + s0 = peg$f347(s1, s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15744,7 +21598,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f261(s1, s5, s9); + s0 = peg$f348(s1, s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15763,23 +21617,23 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 15).toLowerCase() === peg$c148) { + if (input.substr(peg$currPos, 15).toLowerCase() === peg$c244) { s1 = input.substr(peg$currPos, 15); peg$currPos += 15; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e154); + peg$fail(peg$e252); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 15).toLowerCase() === peg$c149) { + if (input.substr(peg$currPos, 15).toLowerCase() === peg$c245) { s1 = input.substr(peg$currPos, 15); peg$currPos += 15; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e155); + peg$fail(peg$e253); } } } @@ -15797,13 +21651,13 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { s8 = peg$parse__(); - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c150) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c246) { s9 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s9 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e156); + peg$fail(peg$e254); } } if (s9 !== peg$FAILED) { @@ -15825,7 +21679,7 @@ function peg$parse(input, options) { s19 = null; } peg$savedPos = s0; - s0 = peg$f262(s1, s5, s15, s19); + s0 = peg$f349(s1, s5, s15, s19); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15864,13 +21718,13 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c83) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c136) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e157); + peg$fail(peg$e255); } } if (s1 !== peg$FAILED) { @@ -15881,13 +21735,13 @@ function peg$parse(input, options) { s5 = peg$parseRPAREN(); if (s5 !== peg$FAILED) { s6 = peg$parse__(); - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c150) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c246) { s7 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e156); + peg$fail(peg$e254); } } if (s7 !== peg$FAILED) { @@ -15909,7 +21763,7 @@ function peg$parse(input, options) { s17 = null; } peg$savedPos = s0; - s0 = peg$f263(s1, s13, s17); + s0 = peg$f350(s1, s13, s17); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -15952,13 +21806,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c151) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c247) { s1 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e158); + peg$fail(peg$e256); } } if (s1 === peg$FAILED) { @@ -15968,7 +21822,7 @@ function peg$parse(input, options) { s3 = peg$parseliteral_string(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f264(s1, s3); + s0 = peg$f351(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16005,7 +21859,7 @@ function peg$parse(input, options) { s11 = null; } peg$savedPos = s0; - s0 = peg$f265(s1, s5, s9, s11); + s0 = peg$f352(s1, s5, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16038,7 +21892,7 @@ function peg$parse(input, options) { s7 = null; } peg$savedPos = s0; - s0 = peg$f266(s1, s3, s5, s7); + s0 = peg$f353(s1, s3, s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16055,7 +21909,7 @@ function peg$parse(input, options) { s1 = peg$parsestar_expr(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f267(s1); + s1 = peg$f354(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -16106,7 +21960,7 @@ function peg$parse(input, options) { s11 = peg$parseRPAREN(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f268(s1, s3, s7, s9); + s0 = peg$f355(s1, s3, s7, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16132,17 +21986,17 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c128; + s1 = peg$c224; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e128); + peg$fail(peg$e226); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f269(); + s1 = peg$f356(); } s0 = s1; @@ -16152,33 +22006,33 @@ function peg$parse(input, options) { function peg$parsetrim_position() { var s0; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c152) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c248) { s0 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e159); + peg$fail(peg$e257); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c153) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c249) { s0 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e160); + peg$fail(peg$e258); } } if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c154) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c250) { s0 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e161); + peg$fail(peg$e259); } } } @@ -16204,7 +22058,7 @@ function peg$parse(input, options) { s5 = peg$parseKW_FROM(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f270(s1, s3, s5); + s0 = peg$f357(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16217,13 +22071,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c155) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c251) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e162); + peg$fail(peg$e260); } } if (s1 !== peg$FAILED) { @@ -16242,7 +22096,7 @@ function peg$parse(input, options) { s9 = peg$parseRPAREN(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f271(s5, s7); + s0 = peg$f358(s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16269,13 +22123,13 @@ function peg$parse(input, options) { s0 = peg$parsetrim_func_clause(); if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c156) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c252) { s1 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e163); + peg$fail(peg$e261); } } if (s1 !== peg$FAILED) { @@ -16291,13 +22145,13 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { s8 = peg$parse__(); - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c157) { + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c253) { s9 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { s9 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e164); + peg$fail(peg$e262); } } if (s9 !== peg$FAILED) { @@ -16305,13 +22159,13 @@ function peg$parse(input, options) { s11 = peg$parseKW_TIME(); if (s11 !== peg$FAILED) { s12 = peg$parse__(); - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c158) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c254) { s13 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s13 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e165); + peg$fail(peg$e263); } } if (s13 !== peg$FAILED) { @@ -16319,7 +22173,7 @@ function peg$parse(input, options) { s15 = peg$parseliteral_string(); if (s15 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f272(s1, s5, s15); + s0 = peg$f359(s1, s5, s15); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16369,7 +22223,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f273(s1, s5, s9); + s0 = peg$f360(s1, s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16383,47 +22237,47 @@ function peg$parse(input, options) { s0 = peg$FAILED; } if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseproc_func_name(); - if (s1 !== peg$FAILED) { - s2 = peg$parse__(); - s3 = peg$parseLPAREN(); - if (s3 !== peg$FAILED) { - s4 = peg$parse__(); - s5 = peg$parseor_and_where_expr(); - if (s5 === peg$FAILED) { - s5 = null; - } - s6 = peg$parse__(); - s7 = peg$parseRPAREN(); - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f274(s1, s5); - } else { - peg$currPos = s0; - s0 = peg$FAILED; + s0 = peg$parseextract_func(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsescalar_time_func(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parseon_update_current_timestamp(); + if (s3 === peg$FAILED) { + s3 = null; } + peg$savedPos = s0; + s0 = peg$f361(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parseextract_func(); if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parsescalar_time_func(); + s1 = peg$parseproc_func_name(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - s3 = peg$parseon_update_current_timestamp(); - if (s3 === peg$FAILED) { - s3 = null; + s3 = peg$parseLPAREN(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseor_and_where_expr(); + if (s5 === peg$FAILED) { + s5 = null; + } + s6 = peg$parse__(); + s7 = peg$parseRPAREN(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f362(s1, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; } - peg$savedPos = s0; - s0 = peg$f275(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16441,223 +22295,223 @@ function peg$parse(input, options) { var s0, s1; s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c159) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c255) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e166); + peg$fail(peg$e264); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c160) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c256) { s1 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e167); + peg$fail(peg$e265); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c161) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c257) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e168); + peg$fail(peg$e266); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c162) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c258) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e169); + peg$fail(peg$e267); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c163) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c259) { s1 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e170); + peg$fail(peg$e268); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c164) { + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c260) { s1 = input.substr(peg$currPos, 3); peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e171); + peg$fail(peg$e269); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c165) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c261) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e172); + peg$fail(peg$e270); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c166) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c262) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e173); + peg$fail(peg$e271); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c167) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c263) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e174); + peg$fail(peg$e272); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c168) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c264) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e175); + peg$fail(peg$e273); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c169) { + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c265) { s1 = input.substr(peg$currPos, 12); peg$currPos += 12; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e176); + peg$fail(peg$e274); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c170) { + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c266) { s1 = input.substr(peg$currPos, 10); peg$currPos += 10; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e177); + peg$fail(peg$e275); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c171) { + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c267) { s1 = input.substr(peg$currPos, 12); peg$currPos += 12; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e178); + peg$fail(peg$e276); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c172) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c268) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e179); + peg$fail(peg$e277); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c173) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c269) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e180); + peg$fail(peg$e278); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c174) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c270) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e181); + peg$fail(peg$e279); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c175) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c271) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e182); + peg$fail(peg$e280); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c176) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c272) { s1 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e183); + peg$fail(peg$e281); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 13).toLowerCase() === peg$c177) { + if (input.substr(peg$currPos, 13).toLowerCase() === peg$c273) { s1 = input.substr(peg$currPos, 13); peg$currPos += 13; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e184); + peg$fail(peg$e282); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 15).toLowerCase() === peg$c178) { + if (input.substr(peg$currPos, 15).toLowerCase() === peg$c274) { s1 = input.substr(peg$currPos, 15); peg$currPos += 15; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e185); + peg$fail(peg$e283); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c179) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c275) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e186); + peg$fail(peg$e284); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c180) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c276) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e187); + peg$fail(peg$e285); } } } @@ -16683,7 +22537,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f276(s1); + s1 = peg$f363(s1); } s0 = s1; @@ -16726,7 +22580,7 @@ function peg$parse(input, options) { s13 = peg$parseRPAREN(); if (s13 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f277(s1, s5, s9, s11); + s0 = peg$f364(s1, s5, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16771,7 +22625,7 @@ function peg$parse(input, options) { s11 = peg$parseRPAREN(); if (s11 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f278(s1, s5, s9); + s0 = peg$f365(s1, s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16828,13 +22682,13 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$parseKW_SYSTEM_USER(); if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c181) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c277) { s0 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e188); + peg$fail(peg$e286); } } } @@ -16846,52 +22700,159 @@ function peg$parse(input, options) { return s0; } + function peg$parsecast_double_colon() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + s0 = peg$currPos; + s1 = peg$parseKW_DOUBLE_COLON(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + s3 = peg$parsedata_type(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = []; + s6 = peg$currPos; + s7 = peg$parseDOUBLE_ARROW(); + if (s7 === peg$FAILED) { + s7 = peg$parseSINGLE_ARROW(); + } + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseliteral_string(); + if (s9 === peg$FAILED) { + s9 = peg$parseliteral_numeric(); + } + if (s9 !== peg$FAILED) { + s7 = [s7, s8, s9]; + s6 = s7; + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$currPos; + s7 = peg$parseDOUBLE_ARROW(); + if (s7 === peg$FAILED) { + s7 = peg$parseSINGLE_ARROW(); + } + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseliteral_string(); + if (s9 === peg$FAILED) { + s9 = peg$parseliteral_numeric(); + } + if (s9 !== peg$FAILED) { + s7 = [s7, s8, s9]; + s6 = s7; + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + } + s6 = peg$parse__(); + s7 = peg$parsealias_clause(); + if (s7 === peg$FAILED) { + s7 = null; + } + peg$savedPos = s0; + s0 = peg$f366(s1, s3, s5, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsecast_expr() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21; s0 = peg$currPos; - s1 = peg$parseLPAREN(); + s1 = peg$parseKW_CAST(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - s3 = peg$parseliteral(); - if (s3 === peg$FAILED) { - s3 = peg$parseaggr_func(); - if (s3 === peg$FAILED) { - s3 = peg$parsewindow_func(); - if (s3 === peg$FAILED) { - s3 = peg$parsefunc_call(); - if (s3 === peg$FAILED) { - s3 = peg$parsecase_expr(); - if (s3 === peg$FAILED) { - s3 = peg$parseinterval_expr(); - if (s3 === peg$FAILED) { - s3 = peg$parsecolumn_ref(); - if (s3 === peg$FAILED) { - s3 = peg$parseparam(); - } - } - } - } - } - } - } + s3 = peg$parseLPAREN(); if (s3 !== peg$FAILED) { s4 = peg$parse__(); - s5 = peg$parseRPAREN(); + s5 = peg$parseexpr(); if (s5 !== peg$FAILED) { s6 = peg$parse__(); - s7 = peg$parseKW_DOUBLE_COLON(); + s7 = peg$parseKW_AS(); if (s7 !== peg$FAILED) { s8 = peg$parse__(); s9 = peg$parsedata_type(); if (s9 !== peg$FAILED) { s10 = peg$parse__(); - s11 = peg$parsealias_clause(); - if (s11 === peg$FAILED) { - s11 = null; + s11 = peg$parseRPAREN(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = []; + s14 = peg$currPos; + s15 = peg$parseDOUBLE_ARROW(); + if (s15 === peg$FAILED) { + s15 = peg$parseSINGLE_ARROW(); + } + if (s15 !== peg$FAILED) { + s16 = peg$parse__(); + s17 = peg$parseliteral_string(); + if (s17 === peg$FAILED) { + s17 = peg$parseliteral_numeric(); + } + if (s17 !== peg$FAILED) { + s15 = [s15, s16, s17]; + s14 = s15; + } else { + peg$currPos = s14; + s14 = peg$FAILED; + } + } else { + peg$currPos = s14; + s14 = peg$FAILED; + } + while (s14 !== peg$FAILED) { + s13.push(s14); + s14 = peg$currPos; + s15 = peg$parseDOUBLE_ARROW(); + if (s15 === peg$FAILED) { + s15 = peg$parseSINGLE_ARROW(); + } + if (s15 !== peg$FAILED) { + s16 = peg$parse__(); + s17 = peg$parseliteral_string(); + if (s17 === peg$FAILED) { + s17 = peg$parseliteral_numeric(); + } + if (s17 !== peg$FAILED) { + s15 = [s15, s16, s17]; + s14 = s15; + } else { + peg$currPos = s14; + s14 = peg$FAILED; + } + } else { + peg$currPos = s14; + s14 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f367(s1, s5, s9, s13); + } else { + peg$currPos = s0; + s0 = peg$FAILED; } - peg$savedPos = s0; - s0 = peg$f279(s3, s7, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16914,42 +22875,58 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseliteral(); - if (s1 === peg$FAILED) { - s1 = peg$parseaggr_func(); - if (s1 === peg$FAILED) { - s1 = peg$parsewindow_func(); - if (s1 === peg$FAILED) { - s1 = peg$parsefunc_call(); - if (s1 === peg$FAILED) { - s1 = peg$parsecase_expr(); - if (s1 === peg$FAILED) { - s1 = peg$parseinterval_expr(); - if (s1 === peg$FAILED) { - s1 = peg$parsecolumn_ref(); - if (s1 === peg$FAILED) { - s1 = peg$parseparam(); - } - } - } - } - } - } - } + s1 = peg$parseKW_CAST(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - s3 = peg$parseKW_DOUBLE_COLON(); + s3 = peg$parseLPAREN(); if (s3 !== peg$FAILED) { s4 = peg$parse__(); - s5 = peg$parsedata_type(); + s5 = peg$parseexpr(); if (s5 !== peg$FAILED) { s6 = peg$parse__(); - s7 = peg$parsealias_clause(); - if (s7 === peg$FAILED) { - s7 = null; + s7 = peg$parseKW_AS(); + if (s7 !== peg$FAILED) { + s8 = peg$parse__(); + s9 = peg$parseKW_DECIMAL(); + if (s9 !== peg$FAILED) { + s10 = peg$parse__(); + s11 = peg$parseLPAREN(); + if (s11 !== peg$FAILED) { + s12 = peg$parse__(); + s13 = peg$parseint(); + if (s13 !== peg$FAILED) { + s14 = peg$parse__(); + s15 = peg$parseRPAREN(); + if (s15 !== peg$FAILED) { + s16 = peg$parse__(); + s17 = peg$parseRPAREN(); + if (s17 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f368(s1, s5, s13); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; } - peg$savedPos = s0; - s0 = peg$f280(s1, s3, s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -16976,13 +22953,48 @@ function peg$parse(input, options) { s7 = peg$parseKW_AS(); if (s7 !== peg$FAILED) { s8 = peg$parse__(); - s9 = peg$parsedata_type(); + s9 = peg$parseKW_DECIMAL(); if (s9 !== peg$FAILED) { s10 = peg$parse__(); - s11 = peg$parseRPAREN(); + s11 = peg$parseLPAREN(); if (s11 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f281(s1, s5, s9); + s12 = peg$parse__(); + s13 = peg$parseint(); + if (s13 !== peg$FAILED) { + s14 = peg$parse__(); + s15 = peg$parseCOMMA(); + if (s15 !== peg$FAILED) { + s16 = peg$parse__(); + s17 = peg$parseint(); + if (s17 !== peg$FAILED) { + s18 = peg$parse__(); + s19 = peg$parseRPAREN(); + if (s19 !== peg$FAILED) { + s20 = peg$parse__(); + s21 = peg$parseRPAREN(); + if (s21 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f369(s1, s5, s13, s17); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17021,34 +23033,18 @@ function peg$parse(input, options) { s7 = peg$parseKW_AS(); if (s7 !== peg$FAILED) { s8 = peg$parse__(); - s9 = peg$parseKW_DECIMAL(); + s9 = peg$parsesignedness(); if (s9 !== peg$FAILED) { s10 = peg$parse__(); - s11 = peg$parseLPAREN(); - if (s11 !== peg$FAILED) { - s12 = peg$parse__(); - s13 = peg$parseint(); - if (s13 !== peg$FAILED) { - s14 = peg$parse__(); - s15 = peg$parseRPAREN(); - if (s15 !== peg$FAILED) { - s16 = peg$parse__(); - s17 = peg$parseRPAREN(); - if (s17 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f282(s1, s5, s13); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } + s11 = peg$parseKW_INTEGER(); + if (s11 === peg$FAILED) { + s11 = null; + } + s12 = peg$parse__(); + s13 = peg$parseRPAREN(); + if (s13 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f370(s1, s5, s9, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17075,72 +23071,42 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseKW_CAST(); + s1 = peg$parseLPAREN(); if (s1 !== peg$FAILED) { s2 = peg$parse__(); - s3 = peg$parseLPAREN(); + s3 = peg$parseliteral(); + if (s3 === peg$FAILED) { + s3 = peg$parseaggr_func(); + if (s3 === peg$FAILED) { + s3 = peg$parsewindow_func(); + if (s3 === peg$FAILED) { + s3 = peg$parsefunc_call(); + if (s3 === peg$FAILED) { + s3 = peg$parsecase_expr(); + if (s3 === peg$FAILED) { + s3 = peg$parseinterval_expr(); + if (s3 === peg$FAILED) { + s3 = peg$parsecolumn_ref_array_index(); + if (s3 === peg$FAILED) { + s3 = peg$parseparam(); + } + } + } + } + } + } + } if (s3 !== peg$FAILED) { s4 = peg$parse__(); - s5 = peg$parseexpr(); + s5 = peg$parseRPAREN(); if (s5 !== peg$FAILED) { s6 = peg$parse__(); - s7 = peg$parseKW_AS(); - if (s7 !== peg$FAILED) { - s8 = peg$parse__(); - s9 = peg$parseKW_DECIMAL(); - if (s9 !== peg$FAILED) { - s10 = peg$parse__(); - s11 = peg$parseLPAREN(); - if (s11 !== peg$FAILED) { - s12 = peg$parse__(); - s13 = peg$parseint(); - if (s13 !== peg$FAILED) { - s14 = peg$parse__(); - s15 = peg$parseCOMMA(); - if (s15 !== peg$FAILED) { - s16 = peg$parse__(); - s17 = peg$parseint(); - if (s17 !== peg$FAILED) { - s18 = peg$parse__(); - s19 = peg$parseRPAREN(); - if (s19 !== peg$FAILED) { - s20 = peg$parse__(); - s21 = peg$parseRPAREN(); - if (s21 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f283(s1, s5, s13, s17); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; + s7 = peg$parsecast_double_colon(); + if (s7 === peg$FAILED) { + s7 = null; } + peg$savedPos = s0; + s0 = peg$f371(s3, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17155,50 +23121,36 @@ function peg$parse(input, options) { } if (s0 === peg$FAILED) { s0 = peg$currPos; - s1 = peg$parseKW_CAST(); + s1 = peg$parseliteral(); + if (s1 === peg$FAILED) { + s1 = peg$parseaggr_func(); + if (s1 === peg$FAILED) { + s1 = peg$parsewindow_func(); + if (s1 === peg$FAILED) { + s1 = peg$parsefunc_call(); + if (s1 === peg$FAILED) { + s1 = peg$parsecase_expr(); + if (s1 === peg$FAILED) { + s1 = peg$parseinterval_expr(); + if (s1 === peg$FAILED) { + s1 = peg$parsecolumn_ref_array_index(); + if (s1 === peg$FAILED) { + s1 = peg$parseparam(); + } + } + } + } + } + } + } if (s1 !== peg$FAILED) { s2 = peg$parse__(); - s3 = peg$parseLPAREN(); - if (s3 !== peg$FAILED) { - s4 = peg$parse__(); - s5 = peg$parseexpr(); - if (s5 !== peg$FAILED) { - s6 = peg$parse__(); - s7 = peg$parseKW_AS(); - if (s7 !== peg$FAILED) { - s8 = peg$parse__(); - s9 = peg$parsesignedness(); - if (s9 !== peg$FAILED) { - s10 = peg$parse__(); - s11 = peg$parseKW_INTEGER(); - if (s11 === peg$FAILED) { - s11 = null; - } - s12 = peg$parse__(); - s13 = peg$parseRPAREN(); - if (s13 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f284(s1, s5, s9, s11); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; + s3 = peg$parsecast_double_colon(); + if (s3 === peg$FAILED) { + s3 = null; } + peg$savedPos = s0; + s0 = peg$f372(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17264,7 +23216,7 @@ function peg$parse(input, options) { s7 = peg$parseRBRAKE(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f285(s1, s5); + s0 = peg$f373(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17326,7 +23278,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f286(s1, s2); + s0 = peg$f374(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17342,7 +23294,7 @@ function peg$parse(input, options) { s1 = peg$parseKW_NULL(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f287(); + s1 = peg$f375(); } s0 = s1; @@ -17356,7 +23308,7 @@ function peg$parse(input, options) { s1 = peg$parseKW_NOT_NULL(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f288(); + s1 = peg$f376(); } s0 = s1; @@ -17370,7 +23322,7 @@ function peg$parse(input, options) { s1 = peg$parseKW_TRUE(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f289(); + s1 = peg$f377(); } s0 = s1; if (s0 === peg$FAILED) { @@ -17378,7 +23330,7 @@ function peg$parse(input, options) { s1 = peg$parseKW_FALSE(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f290(); + s1 = peg$f378(); } s0 = s1; } @@ -17392,12 +23344,12 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 39) { - s2 = peg$c71; + s2 = peg$c124; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s2 !== peg$FAILED) { @@ -17408,12 +23360,12 @@ function peg$parse(input, options) { s4 = peg$parsesingle_char(); } if (input.charCodeAt(peg$currPos) === 39) { - s4 = peg$c71; + s4 = peg$c124; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s4 !== peg$FAILED) { @@ -17429,25 +23381,25 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { s2 = []; - if (peg$r6.test(input.charAt(peg$currPos))) { + if (peg$r8.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e189); + peg$fail(peg$e287); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$r6.test(input.charAt(peg$currPos))) { + if (peg$r8.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e189); + peg$fail(peg$e287); } } } @@ -17458,12 +23410,12 @@ function peg$parse(input, options) { s3 = peg$parse__(); s4 = peg$currPos; if (input.charCodeAt(peg$currPos) === 39) { - s5 = peg$c71; + s5 = peg$c124; peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s5 !== peg$FAILED) { @@ -17474,12 +23426,12 @@ function peg$parse(input, options) { s7 = peg$parsesingle_char(); } if (input.charCodeAt(peg$currPos) === 39) { - s7 = peg$c71; + s7 = peg$c124; peg$currPos++; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s7 !== peg$FAILED) { @@ -17495,7 +23447,7 @@ function peg$parse(input, options) { } if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f291(s1, s4); + s0 = peg$f379(s1, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17512,12 +23464,12 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 39) { - s2 = peg$c71; + s2 = peg$c124; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s2 !== peg$FAILED) { @@ -17528,12 +23480,12 @@ function peg$parse(input, options) { s4 = peg$parsesingle_char(); } if (input.charCodeAt(peg$currPos) === 39) { - s4 = peg$c71; + s4 = peg$c124; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s4 !== peg$FAILED) { @@ -17549,19 +23501,19 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f292(s1); + s1 = peg$f380(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$currPos; if (input.charCodeAt(peg$currPos) === 34) { - s2 = peg$c90; + s2 = peg$c182; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s2 !== peg$FAILED) { @@ -17572,12 +23524,12 @@ function peg$parse(input, options) { s4 = peg$parsesingle_quote_char(); } if (input.charCodeAt(peg$currPos) === 34) { - s4 = peg$c90; + s4 = peg$c182; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s4 !== peg$FAILED) { @@ -17604,7 +23556,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f293(s1); + s0 = peg$f381(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17637,12 +23589,12 @@ function peg$parse(input, options) { s2 = peg$parse__(); s3 = peg$currPos; if (input.charCodeAt(peg$currPos) === 39) { - s4 = peg$c71; + s4 = peg$c124; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s4 !== peg$FAILED) { @@ -17653,12 +23605,12 @@ function peg$parse(input, options) { s6 = peg$parsesingle_char(); } if (input.charCodeAt(peg$currPos) === 39) { - s6 = peg$c71; + s6 = peg$c124; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e71); + peg$fail(peg$e126); } } if (s6 !== peg$FAILED) { @@ -17674,7 +23626,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f294(s1, s3); + s0 = peg$f382(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17699,12 +23651,12 @@ function peg$parse(input, options) { s2 = peg$parse__(); s3 = peg$currPos; if (input.charCodeAt(peg$currPos) === 34) { - s4 = peg$c90; + s4 = peg$c182; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s4 !== peg$FAILED) { @@ -17715,12 +23667,12 @@ function peg$parse(input, options) { s6 = peg$parsesingle_quote_char(); } if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c90; + s6 = peg$c182; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s6 !== peg$FAILED) { @@ -17736,7 +23688,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f295(s1, s3); + s0 = peg$f383(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17753,13 +23705,13 @@ function peg$parse(input, options) { function peg$parsesingle_quote_char() { var s0; - if (peg$r7.test(input.charAt(peg$currPos))) { + if (peg$r9.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e190); + peg$fail(peg$e288); } } if (s0 === peg$FAILED) { @@ -17772,13 +23724,13 @@ function peg$parse(input, options) { function peg$parsesingle_char() { var s0; - if (peg$r8.test(input.charAt(peg$currPos))) { + if (peg$r10.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e191); + peg$fail(peg$e289); } } if (s0 === peg$FAILED) { @@ -17792,157 +23744,157 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c182) { - s1 = peg$c182; + if (input.substr(peg$currPos, 2) === peg$c278) { + s1 = peg$c278; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e192); + peg$fail(peg$e290); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f296(); + s1 = peg$f384(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c183) { - s1 = peg$c183; + if (input.substr(peg$currPos, 2) === peg$c279) { + s1 = peg$c279; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e193); + peg$fail(peg$e291); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f297(); + s1 = peg$f385(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c184) { - s1 = peg$c184; + if (input.substr(peg$currPos, 2) === peg$c280) { + s1 = peg$c280; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e194); + peg$fail(peg$e292); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f298(); + s1 = peg$f386(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c185) { - s1 = peg$c185; + if (input.substr(peg$currPos, 2) === peg$c281) { + s1 = peg$c281; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e195); + peg$fail(peg$e293); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f299(); + s1 = peg$f387(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c186) { - s1 = peg$c186; + if (input.substr(peg$currPos, 2) === peg$c282) { + s1 = peg$c282; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e196); + peg$fail(peg$e294); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f300(); + s1 = peg$f388(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c187) { - s1 = peg$c187; + if (input.substr(peg$currPos, 2) === peg$c283) { + s1 = peg$c283; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e197); + peg$fail(peg$e295); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f301(); + s1 = peg$f389(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c188) { - s1 = peg$c188; + if (input.substr(peg$currPos, 2) === peg$c284) { + s1 = peg$c284; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e198); + peg$fail(peg$e296); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f302(); + s1 = peg$f390(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c189) { - s1 = peg$c189; + if (input.substr(peg$currPos, 2) === peg$c285) { + s1 = peg$c285; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e199); + peg$fail(peg$e297); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f303(); + s1 = peg$f391(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c190) { - s1 = peg$c190; + if (input.substr(peg$currPos, 2) === peg$c286) { + s1 = peg$c286; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e200); + peg$fail(peg$e298); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f304(); + s1 = peg$f392(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c191) { - s1 = peg$c191; + if (input.substr(peg$currPos, 2) === peg$c287) { + s1 = peg$c287; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e201); + peg$fail(peg$e299); } } if (s1 !== peg$FAILED) { @@ -17955,7 +23907,7 @@ function peg$parse(input, options) { s5 = peg$parsehexDigit(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f305(s2, s3, s4, s5); + s0 = peg$f393(s2, s3, s4, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -17979,33 +23931,33 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c192; + s1 = peg$c288; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e202); + peg$fail(peg$e300); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f306(); + s1 = peg$f394(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c193) { - s1 = peg$c193; + if (input.substr(peg$currPos, 2) === peg$c289) { + s1 = peg$c289; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e203); + peg$fail(peg$e301); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f307(); + s1 = peg$f395(); } s0 = s1; } @@ -18026,13 +23978,13 @@ function peg$parse(input, options) { function peg$parseline_terminator() { var s0; - if (peg$r9.test(input.charAt(peg$currPos))) { + if (peg$r11.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e204); + peg$fail(peg$e302); } } @@ -18046,7 +23998,7 @@ function peg$parse(input, options) { s1 = peg$parsenumber(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f308(s1); + s1 = peg$f396(s1); } s0 = s1; @@ -18066,7 +24018,7 @@ function peg$parse(input, options) { s3 = peg$parseexp(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f309(s1, s2, s3); + s0 = peg$f397(s1, s2, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -18084,7 +24036,7 @@ function peg$parse(input, options) { s2 = peg$parsefrac(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f310(s1, s2); + s0 = peg$f398(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -18096,7 +24048,7 @@ function peg$parse(input, options) { s2 = peg$parseexp(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f311(s1, s2); + s0 = peg$f399(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -18110,7 +24062,7 @@ function peg$parse(input, options) { s1 = peg$parseint(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f312(s1); + s1 = peg$f400(s1); } s0 = s1; } @@ -18129,22 +24081,22 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c127; + s1 = peg$c223; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e127); + peg$fail(peg$e225); } } if (s1 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 43) { - s1 = peg$c126; + s1 = peg$c222; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e126); + peg$fail(peg$e224); } } } @@ -18152,7 +24104,7 @@ function peg$parse(input, options) { s2 = peg$parsedigits(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f313(s1, s2); + s0 = peg$f401(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -18164,22 +24116,22 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c127; + s1 = peg$c223; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e127); + peg$fail(peg$e225); } } if (s1 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 43) { - s1 = peg$c126; + s1 = peg$c222; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e126); + peg$fail(peg$e224); } } } @@ -18187,7 +24139,7 @@ function peg$parse(input, options) { s2 = peg$parsedigit(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f314(s1, s2); + s0 = peg$f402(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -18208,19 +24160,19 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 46) { - s1 = peg$c194; + s1 = peg$c290; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e205); + peg$fail(peg$e303); } } if (s1 !== peg$FAILED) { s2 = peg$parsedigits(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f315(s2); + s0 = peg$f403(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -18242,7 +24194,7 @@ function peg$parse(input, options) { s2 = peg$parsedigits(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f316(s1, s2); + s0 = peg$f404(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -18271,7 +24223,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f317(s1); + s1 = peg$f405(s1); } s0 = s1; @@ -18281,13 +24233,13 @@ function peg$parse(input, options) { function peg$parsedigit() { var s0; - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } @@ -18297,13 +24249,13 @@ function peg$parse(input, options) { function peg$parsehexDigit() { var s0; - if (peg$r11.test(input.charAt(peg$currPos))) { + if (peg$r13.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e207); + peg$fail(peg$e305); } } @@ -18314,30 +24266,30 @@ function peg$parse(input, options) { var s0, s1, s2; s0 = peg$currPos; - if (peg$r12.test(input.charAt(peg$currPos))) { + if (peg$r14.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e208); + peg$fail(peg$e306); } } if (s1 !== peg$FAILED) { - if (peg$r13.test(input.charAt(peg$currPos))) { + if (peg$r15.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e209); + peg$fail(peg$e307); } } if (s2 === peg$FAILED) { s2 = null; } peg$savedPos = s0; - s0 = peg$f318(s1, s2); + s0 = peg$f406(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -18350,13 +24302,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c195) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c32) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e210); + peg$fail(peg$e32); } } if (s1 !== peg$FAILED) { @@ -18389,13 +24341,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c23) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c71) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e23); + peg$fail(peg$e73); } } if (s1 !== peg$FAILED) { @@ -18428,13 +24380,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c196) { + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c291) { s1 = input.substr(peg$currPos, 8); peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e211); + peg$fail(peg$e308); } } if (s1 !== peg$FAILED) { @@ -18467,13 +24419,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c197) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c292) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e212); + peg$fail(peg$e309); } } if (s1 !== peg$FAILED) { @@ -18506,1255 +24458,7 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c198) { - s1 = input.substr(peg$currPos, 2); - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e213); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_FALSE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c199) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e214); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SHOW() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c200) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e215); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DROP() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c201) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e216); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f319(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_USE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c202) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e217); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ALTER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c203) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e218); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SELECT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c204) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e219); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UPDATE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c205) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e220); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CREATE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c206) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e221); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TEMPORARY() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c207) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e222); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f320(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TEMP() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c208) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e223); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f321(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DELETE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c209) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e224); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_INSERT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c210) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e225); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_RECURSIVE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c211) { - s1 = peg$c211; - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e226); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REPLACE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c212) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e227); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_RETURNING() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c213) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e228); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f322(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_RENAME() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c214) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e229); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_IGNORE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c146) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e152); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_EXPLAIN() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c215) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e230); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_PARTITION() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c216) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e231); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f323(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_INTO() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c217) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e232); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_FROM() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c218) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e233); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SET() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c61) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e61); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_LOCK() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c33) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e33); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_AS() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c219) { - s1 = input.substr(peg$currPos, 2); - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e234); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TABLE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c220) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e235); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f324(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DATABASE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c221) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e236); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f325(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SCHEME() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c222) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e237); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f326(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SEQUENCE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c223) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e238); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f327(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TABLESPACE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c224) { - s1 = input.substr(peg$currPos, 10); - peg$currPos += 10; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e239); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f328(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_COLLATE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c63) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e63); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f329(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DEALLOCATE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c225) { - s1 = input.substr(peg$currPos, 10); - peg$currPos += 10; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e240); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f330(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ON() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c48) { + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c46) { s1 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { @@ -19789,17 +24493,56 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_LEFT() { + function peg$parseKW_FALSE() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c226) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c293) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e310); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SHOW() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c294) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e241); + peg$fail(peg$e311); } } if (s1 !== peg$FAILED) { @@ -19828,56 +24571,56 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_RIGHT() { + function peg$parseKW_DROP() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c227) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e242); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_FULL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c228) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c295) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e243); + peg$fail(peg$e312); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f407(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_USE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c296) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e313); } } if (s1 !== peg$FAILED) { @@ -19906,17 +24649,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_INNER() { + function peg$parseKW_ALTER() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c229) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c297) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e244); + peg$fail(peg$e314); } } if (s1 !== peg$FAILED) { @@ -19945,134 +24688,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_JOIN() { + function peg$parseKW_SELECT() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c230) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e245); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_OUTER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c231) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e246); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UNION() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c232) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e247); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_VALUES() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c233) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c298) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e248); + peg$fail(peg$e315); } } if (s1 !== peg$FAILED) { @@ -20101,17 +24727,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_USING() { + function peg$parseKW_UPDATE() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c234) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c299) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e249); + peg$fail(peg$e316); } } if (s1 !== peg$FAILED) { @@ -20140,13 +24766,364 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_WHERE() { + function peg$parseKW_CREATE() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c235) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c300) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e317); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TEMPORARY() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c301) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e318); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f408(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TEMP() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c302) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e319); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f409(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_DELETE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c303) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e320); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_INSERT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c304) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e321); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_RECURSIVE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c305) { + s1 = peg$c305; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e322); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f410(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REPLACE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c306) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e323); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_RETURNING() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c307) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e324); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f411(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_RENAME() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c308) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e325); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_IGNORE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c242) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { @@ -20179,17 +25156,992 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_WITH() { + function peg$parseKW_EXPLAIN() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c97) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c309) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e326); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_PARTITION() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c310) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e327); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f412(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_INTO() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c311) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e97); + peg$fail(peg$e328); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_FROM() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c312) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e329); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SET() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c114) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e116); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f413(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_LOCK() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c88) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e90); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_AS() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c313) { + s1 = input.substr(peg$currPos, 2); + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e330); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TABLE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c175) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e177); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f414(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_DATABASE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c144) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e146); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f415(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SCHEMA() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c2) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e2); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f416(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SEQUENCE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c143) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e145); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f417(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TABLESPACE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c314) { + s1 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e331); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f418(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_COLLATE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c116) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e118); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f419(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_DEALLOCATE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c315) { + s1 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e332); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f420(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_ON() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c33) { + s1 = input.substr(peg$currPos, 2); + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e33); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_LEFT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c316) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e333); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_RIGHT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c317) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e334); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_FULL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c318) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e335); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_INNER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c319) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e336); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_JOIN() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c320) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e337); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_OUTER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c321) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e338); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNION() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c322) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e339); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_VALUES() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c323) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e340); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_USING() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c324) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e341); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_WHERE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c325) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e342); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_WITH() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c189) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e191); } } if (s1 !== peg$FAILED) { @@ -20222,13 +26174,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c236) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c326) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e251); + peg$fail(peg$e343); } } if (s1 !== peg$FAILED) { @@ -20261,13 +26213,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c237) { + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c327) { s1 = input.substr(peg$currPos, 2); peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e252); + peg$fail(peg$e344); } } if (s1 !== peg$FAILED) { @@ -20300,13 +26252,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c238) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c328) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e253); + peg$fail(peg$e345); } } if (s1 !== peg$FAILED) { @@ -20339,13 +26291,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c239) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c329) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e254); + peg$fail(peg$e346); } } if (s1 !== peg$FAILED) { @@ -20378,13 +26330,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c240) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c24) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e255); + peg$fail(peg$e24); } } if (s1 !== peg$FAILED) { @@ -20417,13 +26369,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c241) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c330) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e256); + peg$fail(peg$e347); } } if (s1 !== peg$FAILED) { @@ -20456,3718 +26408,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c242) { + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c331) { s1 = input.substr(peg$currPos, 6); peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e257); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f331(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ASC() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c243) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e258); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f332(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DESC() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c244) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e259); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f333(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ALL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c245) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e260); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f334(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DISTINCT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c246) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e261); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f335(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_BETWEEN() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c247) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e262); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f336(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_IN() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c75) { - s1 = input.substr(peg$currPos, 2); - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e75); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f337(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_IS() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c248) { - s1 = input.substr(peg$currPos, 2); - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e263); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f338(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_LIKE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c249) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e264); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f339(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ILIKE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c250) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e265); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f340(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_EXISTS() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c251) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e266); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f341(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_NOT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c52) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e52); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f342(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_AND() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c252) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e267); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f343(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_OR() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2).toLowerCase() === peg$c253) { - s1 = input.substr(peg$currPos, 2); - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e268); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f344(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ARRAY() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c254) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e269); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f345(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ARRAY_AGG() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c255) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e270); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f346(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_COUNT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c256) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e271); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f347(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_GROUP_CONCAT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c257) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e272); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f348(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_MAX() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c258) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e273); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f349(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_MIN() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c259) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e274); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f350(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SUM() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c260) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e275); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f351(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_AVG() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c261) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e276); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f352(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_EXTRACT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c262) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e277); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f353(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CALL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c263) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e278); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f354(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CASE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c264) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e279); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_WHEN() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c265) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e280); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_THEN() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c266) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e281); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ELSE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c267) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e282); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_END() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c268) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e283); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CAST() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c269) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e284); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f355(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_BOOL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c270) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e285); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f356(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_BOOLEAN() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c271) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e286); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f357(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CHAR() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c272) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e287); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f358(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CHARACTER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c60) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e60); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f359(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_VARCHAR() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c273) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e288); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f360(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_NUMERIC() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c274) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e289); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f361(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DECIMAL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c275) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e290); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f362(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SIGNED() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c276) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e291); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f363(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UNSIGNED() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c277) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e292); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f364(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_INT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c278) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e293); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f365(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ZEROFILL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c279) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e294); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f366(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_INTEGER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c280) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e295); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f367(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_JSON() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c281) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e296); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f368(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_JSONB() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c282) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e297); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f369(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_GEOMETRY() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c283) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e298); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f370(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SMALLINT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c284) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e299); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f371(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SERIAL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c285) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e300); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f372(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TINYINT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c286) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e301); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f373(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TINYTEXT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c287) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e302); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f374(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TEXT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c288) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e303); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f375(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_MEDIUMTEXT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c289) { - s1 = input.substr(peg$currPos, 10); - peg$currPos += 10; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e304); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f376(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_LONGTEXT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c290) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e305); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f377(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_BIGINT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c291) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e306); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f378(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ENUM() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c292) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e307); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f379(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_FLOAT() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c293) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e308); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f380(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DOUBLE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c294) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e309); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f381(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_BIGSERIAL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c295) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e310); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f382(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REAL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c296) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e311); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f383(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DATE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c161) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e168); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f384(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_DATETIME() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c297) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e312); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f385(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ROWS() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c298) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e313); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f386(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TIME() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c299) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e314); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f387(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TIMESTAMP() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c300) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e315); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f388(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_TRUNCATE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c301) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e316); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f389(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_USER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c302) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e317); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f390(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UUID() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c303) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e318); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f391(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_OID() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c304) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e319); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f392(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGCLASS() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c305) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e320); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f393(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGCOLLATION() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c306) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e321); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f394(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGCONFIG() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c307) { - s1 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e322); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f395(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGDICTIONARY() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 13).toLowerCase() === peg$c308) { - s1 = input.substr(peg$currPos, 13); - peg$currPos += 13; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e323); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f396(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGNAMESPACE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c309) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e324); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f397(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGOPER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c310) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e325); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f398(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGOPERATOR() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c311) { - s1 = input.substr(peg$currPos, 11); - peg$currPos += 11; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e326); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f399(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGPROC() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c312) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e327); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f400(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGPROCEDURE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c313) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e328); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f401(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGROLE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c314) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e329); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f402(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_REGTYPE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c315) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e330); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f403(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CURRENT_DATE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c316) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e331); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f404(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_ADD_DATE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c317) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e332); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f405(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_INTERVAL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c318) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e333); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f406(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UNIT_YEAR() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c180) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e187); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f407(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UNIT_MONTH() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c173) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e180); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f408(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UNIT_DAY() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c160) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e167); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f409(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UNIT_HOUR() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c166) { - s1 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e173); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f410(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UNIT_MINUTE() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c172) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e179); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f411(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_UNIT_SECOND() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c175) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e182); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f412(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CURRENT_TIME() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c319) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e334); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f413(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CURRENT_TIMESTAMP() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 17).toLowerCase() === peg$c320) { - s1 = input.substr(peg$currPos, 17); - peg$currPos += 17; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e335); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f414(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_CURRENT_USER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c321) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e336); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f415(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SESSION_USER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c322) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e337); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f416(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SYSTEM_USER() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c323) { - s1 = input.substr(peg$currPos, 11); - peg$currPos += 11; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e338); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f417(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_GLOBAL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c324) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e339); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f418(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_SESSION() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c325) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e340); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f419(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_LOCAL() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c326) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e341); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - peg$silentFails++; - s3 = peg$parseident_start(); - peg$silentFails--; - if (s3 === peg$FAILED) { - s2 = undefined; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s0 = peg$f420(); - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - return s0; - } - - function peg$parseKW_PERSIST() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c327) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e342); + peg$fail(peg$e348); } } if (s1 !== peg$FAILED) { @@ -24196,17 +26443,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_PERSIST_ONLY() { + function peg$parseKW_ASC() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c328) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c332) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e343); + peg$fail(peg$e349); } } if (s1 !== peg$FAILED) { @@ -24235,178 +26482,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_VAR__PRE_AT() { - var s0; - - if (input.charCodeAt(peg$currPos) === 64) { - s0 = peg$c329; - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e344); - } - } - - return s0; - } - - function peg$parseKW_VAR__PRE_AT_AT() { - var s0; - - if (input.substr(peg$currPos, 2) === peg$c330) { - s0 = peg$c330; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e345); - } - } - - return s0; - } - - function peg$parseKW_VAR_PRE_DOLLAR() { - var s0; - - if (input.charCodeAt(peg$currPos) === 36) { - s0 = peg$c132; - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e132); - } - } - - return s0; - } - - function peg$parseKW_VAR_PRE_DOLLAR_DOUBLE() { - var s0; - - if (input.substr(peg$currPos, 2) === peg$c331) { - s0 = peg$c331; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e346); - } - } - - return s0; - } - - function peg$parseKW_VAR_PRE() { - var s0; - - s0 = peg$parseKW_VAR__PRE_AT_AT(); - if (s0 === peg$FAILED) { - s0 = peg$parseKW_VAR__PRE_AT(); - if (s0 === peg$FAILED) { - s0 = peg$parseKW_VAR_PRE_DOLLAR(); - if (s0 === peg$FAILED) { - s0 = peg$parseKW_VAR_PRE_DOLLAR(); - } - } - } - - return s0; - } - - function peg$parseKW_RETURN() { - var s0; - - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c332) { - s0 = input.substr(peg$currPos, 6); - peg$currPos += 6; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e347); - } - } - - return s0; - } - - function peg$parseKW_ASSIGN() { - var s0; - - if (input.substr(peg$currPos, 2) === peg$c333) { - s0 = peg$c333; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e348); - } - } - - return s0; - } - - function peg$parseKW_DOUBLE_COLON() { - var s0; - - if (input.substr(peg$currPos, 2) === peg$c334) { - s0 = peg$c334; - peg$currPos += 2; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e349); - } - } - - return s0; - } - - function peg$parseKW_ASSIGIN_EQUAL() { - var s0; - - if (input.charCodeAt(peg$currPos) === 61) { - s0 = peg$c109; - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e109); - } - } - - return s0; - } - - function peg$parseKW_DUAL() { - var s0; - - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c335) { - s0 = input.substr(peg$currPos, 4); - peg$currPos += 4; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$e350); - } - } - - return s0; - } - - function peg$parseKW_ADD() { + function peg$parseKW_DESC() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c336) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c333) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e351); + peg$fail(peg$e350); } } if (s1 !== peg$FAILED) { @@ -24435,17 +26521,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_COLUMN() { + function peg$parseKW_ALL() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c337) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c334) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e352); + peg$fail(peg$e351); } } if (s1 !== peg$FAILED) { @@ -24474,17 +26560,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_INDEX() { + function peg$parseKW_DISTINCT() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c338) { - s1 = input.substr(peg$currPos, 5); - peg$currPos += 5; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c335) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e353); + peg$fail(peg$e352); } } if (s1 !== peg$FAILED) { @@ -24513,17 +26599,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_KEY() { + function peg$parseKW_BETWEEN() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 3).toLowerCase() === peg$c18) { - s1 = input.substr(peg$currPos, 3); - peg$currPos += 3; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c336) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e18); + peg$fail(peg$e353); } } if (s1 !== peg$FAILED) { @@ -24552,17 +26638,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_FULLTEXT() { + function peg$parseKW_IN() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c339) { - s1 = input.substr(peg$currPos, 8); - peg$currPos += 8; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c128) { + s1 = input.substr(peg$currPos, 2); + peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e354); + peg$fail(peg$e130); } } if (s1 !== peg$FAILED) { @@ -24591,17 +26677,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_SPATIAL() { + function peg$parseKW_IS() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c340) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c337) { + s1 = input.substr(peg$currPos, 2); + peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e355); + peg$fail(peg$e354); } } if (s1 !== peg$FAILED) { @@ -24630,17 +26716,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_UNIQUE() { + function peg$parseKW_LIKE() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 6).toLowerCase() === peg$c17) { - s1 = input.substr(peg$currPos, 6); - peg$currPos += 6; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c338) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e17); + peg$fail(peg$e355); } } if (s1 !== peg$FAILED) { @@ -24669,17 +26755,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_KEY_BLOCK_SIZE() { + function peg$parseKW_ILIKE() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 14).toLowerCase() === peg$c65) { - s1 = input.substr(peg$currPos, 14); - peg$currPos += 14; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c339) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e65); + peg$fail(peg$e356); } } if (s1 !== peg$FAILED) { @@ -24708,17 +26794,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_COMMENT() { + function peg$parseKW_EXISTS() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c341) { - s1 = input.substr(peg$currPos, 7); - peg$currPos += 7; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c340) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e356); + peg$fail(peg$e357); } } if (s1 !== peg$FAILED) { @@ -24747,17 +26833,17 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_CONSTRAINT() { + function peg$parseKW_NOT() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c342) { - s1 = input.substr(peg$currPos, 10); - peg$currPos += 10; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c29) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e357); + peg$fail(peg$e29); } } if (s1 !== peg$FAILED) { @@ -24786,13 +26872,13 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_CONCURRENTLY() { + function peg$parseKW_AND() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c343) { - s1 = input.substr(peg$currPos, 12); - peg$currPos += 12; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c341) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { @@ -24825,13 +26911,13 @@ function peg$parse(input, options) { return s0; } - function peg$parseKW_REFERENCES() { + function peg$parseKW_OR() { var s0, s1, s2, s3; s0 = peg$currPos; - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c344) { - s1 = input.substr(peg$currPos, 10); - peg$currPos += 10; + if (input.substr(peg$currPos, 2).toLowerCase() === peg$c342) { + s1 = input.substr(peg$currPos, 2); + peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { @@ -24864,16 +26950,3960 @@ function peg$parse(input, options) { return s0; } + function peg$parseKW_ARRAY() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c343) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e360); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f435(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_ARRAY_AGG() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c344) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e361); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f436(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_COUNT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c345) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e362); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f437(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_GROUP_CONCAT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c346) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e363); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f438(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_MAX() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c347) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e364); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f439(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_MIN() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c348) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e365); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f440(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SUM() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c349) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e366); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f441(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_AVG() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c350) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e367); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f442(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_EXTRACT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c351) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e368); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f443(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CALL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c352) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e369); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f444(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CASE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c353) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e370); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_WHEN() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c354) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e371); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_THEN() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c160) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e162); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_ELSE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c355) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e372); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_END() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c161) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e163); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CAST() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c356) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e373); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f445(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_BOOL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c357) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e374); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f446(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_BOOLEAN() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c358) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e375); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f447(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CHAR() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c359) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e376); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f448(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CHARACTER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c113) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e115); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f449(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_VARCHAR() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c360) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e377); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f450(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_NUMERIC() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c361) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e378); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f451(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_DECIMAL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c362) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e379); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f452(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SIGNED() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c363) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e380); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f453(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNSIGNED() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c364) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e381); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f454(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_INT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c365) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e382); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f455(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_ZEROFILL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c366) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e383); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f456(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_INTEGER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c367) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e384); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f457(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_JSON() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c368) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e385); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f458(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_JSONB() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c369) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e386); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f459(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_GEOMETRY() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c370) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e387); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f460(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SMALLINT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c371) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e388); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f461(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SERIAL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c372) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e389); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f462(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TINYINT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c373) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e390); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f463(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TINYTEXT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c374) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e391); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f464(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TEXT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c375) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e392); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f465(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_MEDIUMTEXT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c376) { + s1 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e393); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f466(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_LONGTEXT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c377) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e394); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f467(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_BIGINT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c378) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e395); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f468(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_ENUM() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c379) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e396); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f469(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_FLOAT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c380) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e397); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f470(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_DOUBLE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 16).toLowerCase() === peg$c381) { + s1 = input.substr(peg$currPos, 16); + peg$currPos += 16; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e398); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f471(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_BIGSERIAL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c382) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e399); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f472(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REAL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c383) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e400); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f473(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_DATE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c257) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e266); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f474(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_DATETIME() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c384) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e401); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f475(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_ROWS() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c44) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e46); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f476(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TIME() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c385) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e402); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f477(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TIMESTAMP() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c386) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e403); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f478(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_TRUNCATE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c387) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e404); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f479(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_USER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c388) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e405); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f480(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UUID() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c389) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e406); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f481(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_OID() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c390) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e407); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f482(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGCLASS() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c391) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e408); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f483(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGCOLLATION() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c392) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e409); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f484(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGCONFIG() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c393) { + s1 = input.substr(peg$currPos, 9); + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e410); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f485(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGDICTIONARY() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 13).toLowerCase() === peg$c394) { + s1 = input.substr(peg$currPos, 13); + peg$currPos += 13; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e411); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f486(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGNAMESPACE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c395) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e412); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f487(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGOPER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c396) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e413); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f488(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGOPERATOR() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 11).toLowerCase() === peg$c397) { + s1 = input.substr(peg$currPos, 11); + peg$currPos += 11; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e414); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f489(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGPROC() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c398) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e415); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f490(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGPROCEDURE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c399) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e416); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f491(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGROLE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c400) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e417); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f492(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REGTYPE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c401) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e418); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f493(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CURRENT_DATE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c402) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e419); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f494(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_ADD_DATE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c403) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e420); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f495(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_INTERVAL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c404) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e421); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f496(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNIT_YEAR() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c276) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e285); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f497(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNIT_MONTH() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c269) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e278); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f498(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNIT_DAY() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c256) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e265); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f499(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNIT_HOUR() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c262) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e271); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f500(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNIT_MINUTE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c268) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e277); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f501(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNIT_SECOND() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c271) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e280); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f502(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CURRENT_TIME() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c405) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e422); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f503(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CURRENT_TIMESTAMP() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 17).toLowerCase() === peg$c406) { + s1 = input.substr(peg$currPos, 17); + peg$currPos += 17; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e423); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f504(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CURRENT_USER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c82) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e84); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f505(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CURRENT_ROLE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c81) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e83); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f506(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SESSION_USER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c83) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e85); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f507(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SYSTEM_USER() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 11).toLowerCase() === peg$c407) { + s1 = input.substr(peg$currPos, 11); + peg$currPos += 11; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e424); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f508(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_GLOBAL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c408) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e425); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f509(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SESSION() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c409) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e426); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f510(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_LOCAL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c5) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e5); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f511(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_PERSIST() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c410) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e427); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f512(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_PERSIST_ONLY() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c411) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e428); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f513(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_VIEW() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c412) { + s1 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e429); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f514(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_VAR__PRE_AT() { + var s0; + + if (input.charCodeAt(peg$currPos) === 64) { + s0 = peg$c413; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e430); + } + } + + return s0; + } + + function peg$parseKW_VAR__PRE_AT_AT() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c414) { + s0 = peg$c414; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e431); + } + } + + return s0; + } + + function peg$parseKW_VAR_PRE_DOLLAR() { + var s0; + + if (input.charCodeAt(peg$currPos) === 36) { + s0 = peg$c228; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e230); + } + } + + return s0; + } + + function peg$parseKW_VAR_PRE_DOLLAR_DOUBLE() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c415) { + s0 = peg$c415; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e432); + } + } + + return s0; + } + + function peg$parseKW_VAR_PRE() { + var s0; + + s0 = peg$parseKW_VAR__PRE_AT_AT(); + if (s0 === peg$FAILED) { + s0 = peg$parseKW_VAR__PRE_AT(); + if (s0 === peg$FAILED) { + s0 = peg$parseKW_VAR_PRE_DOLLAR(); + if (s0 === peg$FAILED) { + s0 = peg$parseKW_VAR_PRE_DOLLAR(); + } + } + } + + return s0; + } + + function peg$parseKW_RETURN() { + var s0; + + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c416) { + s0 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e433); + } + } + + return s0; + } + + function peg$parseKW_ASSIGN() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c17) { + s0 = peg$c17; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e17); + } + } + + return s0; + } + + function peg$parseKW_DOUBLE_COLON() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c417) { + s0 = peg$c417; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e434); + } + } + + return s0; + } + + function peg$parseKW_ASSIGIN_EQUAL() { + var s0; + + if (input.charCodeAt(peg$currPos) === 61) { + s0 = peg$c47; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e49); + } + } + + return s0; + } + + function peg$parseKW_DUAL() { + var s0; + + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c418) { + s0 = input.substr(peg$currPos, 4); + peg$currPos += 4; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e435); + } + } + + return s0; + } + + function peg$parseKW_ADD() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c419) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e436); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f515(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_COLUMN() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c172) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e174); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f516(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_INDEX() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c420) { + s1 = input.substr(peg$currPos, 5); + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e437); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f517(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_KEY() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 3).toLowerCase() === peg$c66) { + s1 = input.substr(peg$currPos, 3); + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e68); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f518(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_FULLTEXT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 8).toLowerCase() === peg$c421) { + s1 = input.substr(peg$currPos, 8); + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e438); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f519(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_SPATIAL() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c422) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e439); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f520(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_UNIQUE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c65) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e67); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f521(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_KEY_BLOCK_SIZE() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 14).toLowerCase() === peg$c118) { + s1 = input.substr(peg$currPos, 14); + peg$currPos += 14; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e120); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f522(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_COMMENT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c423) { + s1 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e440); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f523(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CONSTRAINT() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c173) { + s1 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e175); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f524(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_CONCURRENTLY() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c424) { + s1 = input.substr(peg$currPos, 12); + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e441); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f525(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseKW_REFERENCES() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 10).toLowerCase() === peg$c425) { + s1 = input.substr(peg$currPos, 10); + peg$currPos += 10; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e442); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseident_start(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f526(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parseOPT_SQL_CALC_FOUND_ROWS() { var s0; - if (input.substr(peg$currPos, 19).toLowerCase() === peg$c345) { + if (input.substr(peg$currPos, 19).toLowerCase() === peg$c426) { s0 = input.substr(peg$currPos, 19); peg$currPos += 19; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e360); + peg$fail(peg$e443); } } @@ -24883,13 +30913,13 @@ function peg$parse(input, options) { function peg$parseOPT_SQL_CACHE() { var s0; - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c346) { + if (input.substr(peg$currPos, 9).toLowerCase() === peg$c427) { s0 = input.substr(peg$currPos, 9); peg$currPos += 9; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e361); + peg$fail(peg$e444); } } @@ -24899,13 +30929,13 @@ function peg$parse(input, options) { function peg$parseOPT_SQL_NO_CACHE() { var s0; - if (input.substr(peg$currPos, 12).toLowerCase() === peg$c347) { + if (input.substr(peg$currPos, 12).toLowerCase() === peg$c428) { s0 = input.substr(peg$currPos, 12); peg$currPos += 12; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e362); + peg$fail(peg$e445); } } @@ -24915,13 +30945,13 @@ function peg$parse(input, options) { function peg$parseOPT_SQL_SMALL_RESULT() { var s0; - if (input.substr(peg$currPos, 16).toLowerCase() === peg$c348) { + if (input.substr(peg$currPos, 16).toLowerCase() === peg$c429) { s0 = input.substr(peg$currPos, 16); peg$currPos += 16; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e363); + peg$fail(peg$e446); } } @@ -24931,13 +30961,13 @@ function peg$parse(input, options) { function peg$parseOPT_SQL_BIG_RESULT() { var s0; - if (input.substr(peg$currPos, 14).toLowerCase() === peg$c349) { + if (input.substr(peg$currPos, 14).toLowerCase() === peg$c430) { s0 = input.substr(peg$currPos, 14); peg$currPos += 14; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e364); + peg$fail(peg$e447); } } @@ -24947,13 +30977,13 @@ function peg$parse(input, options) { function peg$parseOPT_SQL_BUFFER_RESULT() { var s0; - if (input.substr(peg$currPos, 17).toLowerCase() === peg$c350) { + if (input.substr(peg$currPos, 17).toLowerCase() === peg$c431) { s0 = input.substr(peg$currPos, 17); peg$currPos += 17; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e365); + peg$fail(peg$e448); } } @@ -24964,12 +30994,12 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 46) { - s0 = peg$c194; + s0 = peg$c290; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e205); + peg$fail(peg$e303); } } @@ -24980,12 +31010,12 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 44) { - s0 = peg$c351; + s0 = peg$c432; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e366); + peg$fail(peg$e449); } } @@ -24996,12 +31026,12 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 42) { - s0 = peg$c128; + s0 = peg$c224; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e128); + peg$fail(peg$e226); } } @@ -25012,12 +31042,12 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 40) { - s0 = peg$c88; + s0 = peg$c180; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e88); + peg$fail(peg$e182); } } @@ -25028,12 +31058,12 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 41) { - s0 = peg$c89; + s0 = peg$c181; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e89); + peg$fail(peg$e183); } } @@ -25044,12 +31074,12 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 91) { - s0 = peg$c352; + s0 = peg$c433; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e367); + peg$fail(peg$e450); } } @@ -25060,12 +31090,12 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 93) { - s0 = peg$c353; + s0 = peg$c434; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e368); + peg$fail(peg$e451); } } @@ -25076,12 +31106,12 @@ function peg$parse(input, options) { var s0; if (input.charCodeAt(peg$currPos) === 59) { - s0 = peg$c87; + s0 = peg$c179; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e87); + peg$fail(peg$e181); } } @@ -25091,13 +31121,13 @@ function peg$parse(input, options) { function peg$parseSINGLE_ARROW() { var s0; - if (input.substr(peg$currPos, 2) === peg$c354) { - s0 = peg$c354; + if (input.substr(peg$currPos, 2) === peg$c435) { + s0 = peg$c435; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e369); + peg$fail(peg$e452); } } @@ -25107,13 +31137,13 @@ function peg$parse(input, options) { function peg$parseDOUBLE_ARROW() { var s0; - if (input.substr(peg$currPos, 3) === peg$c355) { - s0 = peg$c355; + if (input.substr(peg$currPos, 3) === peg$c436) { + s0 = peg$c436; peg$currPos += 3; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e370); + peg$fail(peg$e453); } } @@ -25123,13 +31153,13 @@ function peg$parse(input, options) { function peg$parseWELL_ARROW() { var s0; - if (input.substr(peg$currPos, 2) === peg$c356) { - s0 = peg$c356; + if (input.substr(peg$currPos, 2) === peg$c437) { + s0 = peg$c437; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e371); + peg$fail(peg$e454); } } @@ -25139,13 +31169,13 @@ function peg$parse(input, options) { function peg$parseDOUBLE_WELL_ARROW() { var s0; - if (input.substr(peg$currPos, 3) === peg$c357) { - s0 = peg$c357; + if (input.substr(peg$currPos, 3) === peg$c438) { + s0 = peg$c438; peg$currPos += 3; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e372); + peg$fail(peg$e455); } } @@ -25155,13 +31185,13 @@ function peg$parse(input, options) { function peg$parseOPERATOR_CONCATENATION() { var s0; - if (input.substr(peg$currPos, 2) === peg$c131) { - s0 = peg$c131; + if (input.substr(peg$currPos, 2) === peg$c227) { + s0 = peg$c227; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e131); + peg$fail(peg$e229); } } @@ -25171,13 +31201,13 @@ function peg$parse(input, options) { function peg$parseOPERATOR_AND() { var s0; - if (input.substr(peg$currPos, 2) === peg$c358) { - s0 = peg$c358; + if (input.substr(peg$currPos, 2) === peg$c439) { + s0 = peg$c439; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e373); + peg$fail(peg$e456); } } @@ -25252,13 +31282,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5, s6; s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c359) { - s1 = peg$c359; + if (input.substr(peg$currPos, 2) === peg$c440) { + s1 = peg$c440; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e374); + peg$fail(peg$e457); } } if (s1 !== peg$FAILED) { @@ -25266,13 +31296,13 @@ function peg$parse(input, options) { s3 = peg$currPos; s4 = peg$currPos; peg$silentFails++; - if (input.substr(peg$currPos, 2) === peg$c360) { - s5 = peg$c360; + if (input.substr(peg$currPos, 2) === peg$c441) { + s5 = peg$c441; peg$currPos += 2; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e375); + peg$fail(peg$e458); } } peg$silentFails--; @@ -25285,13 +31315,13 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$currPos; peg$silentFails++; - if (input.substr(peg$currPos, 2) === peg$c359) { - s6 = peg$c359; + if (input.substr(peg$currPos, 2) === peg$c440) { + s6 = peg$c440; peg$currPos += 2; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e374); + peg$fail(peg$e457); } } peg$silentFails--; @@ -25326,13 +31356,13 @@ function peg$parse(input, options) { s3 = peg$currPos; s4 = peg$currPos; peg$silentFails++; - if (input.substr(peg$currPos, 2) === peg$c360) { - s5 = peg$c360; + if (input.substr(peg$currPos, 2) === peg$c441) { + s5 = peg$c441; peg$currPos += 2; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e375); + peg$fail(peg$e458); } } peg$silentFails--; @@ -25345,13 +31375,13 @@ function peg$parse(input, options) { if (s4 !== peg$FAILED) { s5 = peg$currPos; peg$silentFails++; - if (input.substr(peg$currPos, 2) === peg$c359) { - s6 = peg$c359; + if (input.substr(peg$currPos, 2) === peg$c440) { + s6 = peg$c440; peg$currPos += 2; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e374); + peg$fail(peg$e457); } } peg$silentFails--; @@ -25382,13 +31412,13 @@ function peg$parse(input, options) { s3 = peg$parseblock_comment(); } } - if (input.substr(peg$currPos, 2) === peg$c360) { - s3 = peg$c360; + if (input.substr(peg$currPos, 2) === peg$c441) { + s3 = peg$c441; peg$currPos += 2; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e375); + peg$fail(peg$e458); } } if (s3 !== peg$FAILED) { @@ -25410,13 +31440,13 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c361) { - s1 = peg$c361; + if (input.substr(peg$currPos, 2) === peg$c442) { + s1 = peg$c442; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e376); + peg$fail(peg$e459); } } if (s1 !== peg$FAILED) { @@ -25487,12 +31517,12 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 35) { - s1 = peg$c362; + s1 = peg$c443; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e377); + peg$fail(peg$e460); } } if (s1 !== peg$FAILED) { @@ -25573,7 +31603,7 @@ function peg$parse(input, options) { s5 = peg$parseliteral_string(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f435(s1, s3, s5); + s0 = peg$f527(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -25595,7 +31625,7 @@ function peg$parse(input, options) { } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e378); + peg$fail(peg$e461); } } @@ -25628,13 +31658,13 @@ function peg$parse(input, options) { function peg$parsewhitespace() { var s0; - if (peg$r14.test(input.charAt(peg$currPos))) { + if (peg$r16.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e379); + peg$fail(peg$e462); } } @@ -25647,25 +31677,25 @@ function peg$parse(input, options) { s0 = peg$parseEOF(); if (s0 === peg$FAILED) { s0 = []; - if (peg$r9.test(input.charAt(peg$currPos))) { + if (peg$r11.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e204); + peg$fail(peg$e302); } } if (s1 !== peg$FAILED) { while (s1 !== peg$FAILED) { s0.push(s1); - if (peg$r9.test(input.charAt(peg$currPos))) { + if (peg$r11.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e204); + peg$fail(peg$e302); } } } @@ -25688,7 +31718,7 @@ function peg$parse(input, options) { } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e378); + peg$fail(peg$e461); } } peg$silentFails--; @@ -25720,7 +31750,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f436(); + s1 = peg$f528(); if (s1) { s1 = undefined; } else { @@ -25734,7 +31764,7 @@ function peg$parse(input, options) { } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f437(s3); + s0 = peg$f529(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -25766,7 +31796,7 @@ function peg$parse(input, options) { s5 = peg$parseproc_expr(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f438(s1, s3, s5); + s0 = peg$f530(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -25793,7 +31823,7 @@ function peg$parse(input, options) { s3 = peg$parseproc_expr(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f439(s3); + s0 = peg$f531(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -25868,7 +31898,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f440(s1, s2); + s0 = peg$f532(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -25922,7 +31952,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f441(s1, s2); + s0 = peg$f533(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -25947,7 +31977,7 @@ function peg$parse(input, options) { s7 = peg$parseon_clause(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f442(s1, s3, s5, s7); + s0 = peg$f534(s1, s3, s5, s7); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -25989,7 +32019,7 @@ function peg$parse(input, options) { s5 = peg$parseRPAREN(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f443(s3); + s0 = peg$f535(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26002,6 +32032,36 @@ function peg$parse(input, options) { peg$currPos = s0; s0 = peg$FAILED; } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseident_name(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$parseDOT(); + if (s3 !== peg$FAILED) { + s4 = peg$parse__(); + s5 = peg$parseident_name(); + if (s5 !== peg$FAILED) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = null; + } + peg$savedPos = s0; + s0 = peg$f536(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } } } } @@ -26037,7 +32097,7 @@ function peg$parse(input, options) { s2 = null; } peg$savedPos = s0; - s0 = peg$f444(s1, s2); + s0 = peg$f537(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26064,7 +32124,7 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f445(s1, s5); + s0 = peg$f538(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26077,15 +32137,6 @@ function peg$parse(input, options) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseproc_func_name(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f446(s1); - } - s0 = s1; - } return s0; } @@ -26135,7 +32186,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f447(s1, s2); + s0 = peg$f539(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26157,7 +32208,7 @@ function peg$parse(input, options) { s5 = peg$parseRBRAKE(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f448(s3); + s0 = peg$f540(s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26219,7 +32270,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s0 = peg$f449(s1, s2); + s0 = peg$f541(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26235,31 +32286,31 @@ function peg$parse(input, options) { s1 = peg$parseKW_VAR_PRE_DOLLAR_DOUBLE(); if (s1 !== peg$FAILED) { s2 = []; - if (peg$r15.test(input.charAt(peg$currPos))) { + if (peg$r17.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e380); + peg$fail(peg$e463); } } while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$r15.test(input.charAt(peg$currPos))) { + if (peg$r17.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e380); + peg$fail(peg$e463); } } } s3 = peg$parseKW_VAR_PRE_DOLLAR_DOUBLE(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f450(s1, s2, s3); + s0 = peg$f542(s1, s2, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26272,38 +32323,38 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parseKW_VAR_PRE_DOLLAR(); if (s1 !== peg$FAILED) { - s2 = peg$parseident(); + s2 = peg$parsecolumn(); if (s2 !== peg$FAILED) { s3 = peg$parseKW_VAR_PRE_DOLLAR(); if (s3 !== peg$FAILED) { s4 = []; - if (peg$r15.test(input.charAt(peg$currPos))) { + if (peg$r17.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e380); + peg$fail(peg$e463); } } while (s5 !== peg$FAILED) { s4.push(s5); - if (peg$r15.test(input.charAt(peg$currPos))) { + if (peg$r17.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e380); + peg$fail(peg$e463); } } } s5 = peg$parseKW_VAR_PRE_DOLLAR(); if (s5 !== peg$FAILED) { - s6 = peg$parseident(); + s6 = peg$parsecolumn(); if (s6 !== peg$FAILED) { peg$savedPos = peg$currPos; - s7 = peg$f451(s2, s4, s6); + s7 = peg$f543(s2, s4, s6); if (s7) { s7 = peg$FAILED; } else { @@ -26313,7 +32364,7 @@ function peg$parse(input, options) { s8 = peg$parseKW_VAR_PRE_DOLLAR(); if (s8 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f452(s2, s4, s6); + s0 = peg$f544(s2, s4, s6); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26349,7 +32400,7 @@ function peg$parse(input, options) { s2 = peg$parsewithout_prefix_var_decl(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f453(s1, s2); + s0 = peg$f545(s1, s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26369,12 +32420,12 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 34) { - s1 = peg$c90; + s1 = peg$c182; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s1 === peg$FAILED) { @@ -26384,19 +32435,19 @@ function peg$parse(input, options) { if (s2 !== peg$FAILED) { s3 = peg$parsemem_chain(); if (input.charCodeAt(peg$currPos) === 34) { - s4 = peg$c90; + s4 = peg$c182; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e90); + peg$fail(peg$e184); } } if (s4 === peg$FAILED) { s4 = null; } peg$savedPos = s0; - s0 = peg$f454(s1, s2, s3, s4); + s0 = peg$f546(s1, s2, s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26406,7 +32457,7 @@ function peg$parse(input, options) { s1 = peg$parseliteral_numeric(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f455(s1); + s1 = peg$f547(s1); } s0 = s1; } @@ -26421,12 +32472,12 @@ function peg$parse(input, options) { s1 = []; s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c194; + s3 = peg$c290; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e205); + peg$fail(peg$e303); } } if (s3 !== peg$FAILED) { @@ -26446,12 +32497,12 @@ function peg$parse(input, options) { s1.push(s2); s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 46) { - s3 = peg$c194; + s3 = peg$c290; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e205); + peg$fail(peg$e303); } } if (s3 !== peg$FAILED) { @@ -26469,7 +32520,7 @@ function peg$parse(input, options) { } } peg$savedPos = s0; - s1 = peg$f456(s1); + s1 = peg$f548(s1); s0 = s1; return s0; @@ -26503,6 +32554,9 @@ function peg$parse(input, options) { s0 = peg$parsebinary_type(); if (s0 === peg$FAILED) { s0 = peg$parseoid_type(); + if (s0 === peg$FAILED) { + s0 = peg$parserecord_type(); + } } } } @@ -26541,7 +32595,7 @@ function peg$parse(input, options) { s9 = peg$parseRBRAKE(); if (s9 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f457(s1); + s0 = peg$f549(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26576,7 +32630,7 @@ function peg$parse(input, options) { s5 = peg$parseRBRAKE(); if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f458(s1); + s0 = peg$f550(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26604,7 +32658,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f459(s1); + s1 = peg$f551(s1); } s0 = s1; @@ -26615,24 +32669,53 @@ function peg$parse(input, options) { var s0, s1; s0 = peg$currPos; - if (input.substr(peg$currPos, 5).toLowerCase() === peg$c363) { + if (input.substr(peg$currPos, 5).toLowerCase() === peg$c444) { s1 = input.substr(peg$currPos, 5); peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e381); + peg$fail(peg$e464); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f460(); + s1 = peg$f552(); } s0 = s1; return s0; } + function peg$parsecharacter_varying() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseKW_CHARACTER(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c445) { + s3 = input.substr(peg$currPos, 7); + peg$currPos += 7; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e465); + } + } + if (s3 === peg$FAILED) { + s3 = null; + } + peg$savedPos = s0; + s0 = peg$f553(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + function peg$parsecharacter_string_type() { var s0, s1, s2, s3, s4, s5, s6, s7; @@ -26640,6 +32723,9 @@ function peg$parse(input, options) { s1 = peg$parseKW_CHAR(); if (s1 === peg$FAILED) { s1 = peg$parseKW_VARCHAR(); + if (s1 === peg$FAILED) { + s1 = peg$parsecharacter_varying(); + } } if (s1 !== peg$FAILED) { s2 = peg$parse__(); @@ -26647,25 +32733,25 @@ function peg$parse(input, options) { if (s3 !== peg$FAILED) { s4 = peg$parse__(); s5 = []; - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } if (s6 !== peg$FAILED) { while (s6 !== peg$FAILED) { s5.push(s6); - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } } @@ -26677,7 +32763,7 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f461(s1, s5); + s0 = peg$f554(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26698,22 +32784,16 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parseKW_CHAR(); if (s1 === peg$FAILED) { - s1 = peg$parseKW_CHARACTER(); + s1 = peg$parsecharacter_varying(); + if (s1 === peg$FAILED) { + s1 = peg$parseKW_VARCHAR(); + } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f462(s1); + s1 = peg$f555(s1); } s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseKW_VARCHAR(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$f463(s1); - } - s0 = s1; - } } return s0; @@ -26733,7 +32813,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f464(s1, s3); + s0 = peg$f556(s1, s3); return s0; } @@ -26782,25 +32862,25 @@ function peg$parse(input, options) { if (s3 !== peg$FAILED) { s4 = peg$parse__(); s5 = []; - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } if (s6 !== peg$FAILED) { while (s6 !== peg$FAILED) { s5.push(s6); - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } } @@ -26814,25 +32894,25 @@ function peg$parse(input, options) { if (s8 !== peg$FAILED) { s9 = peg$parse__(); s10 = []; - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s11 = input.charAt(peg$currPos); peg$currPos++; } else { s11 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } if (s11 !== peg$FAILED) { while (s11 !== peg$FAILED) { s10.push(s11); - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s11 = input.charAt(peg$currPos); peg$currPos++; } else { s11 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } } @@ -26859,7 +32939,7 @@ function peg$parse(input, options) { s10 = peg$parse__(); s11 = peg$parsenumeric_type_suffix(); peg$savedPos = s0; - s0 = peg$f465(s1, s5, s7, s11); + s0 = peg$f557(s1, s5, s7, s11); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26914,25 +32994,25 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { s2 = []; - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } } @@ -26943,7 +33023,7 @@ function peg$parse(input, options) { s3 = peg$parse__(); s4 = peg$parsenumeric_type_suffix(); peg$savedPos = s0; - s0 = peg$f466(s1, s2, s4); + s0 = peg$f558(s1, s2, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -26993,7 +33073,7 @@ function peg$parse(input, options) { s3 = peg$parsenumeric_type_suffix(); s4 = peg$parse__(); peg$savedPos = s0; - s0 = peg$f467(s1, s3); + s0 = peg$f559(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -27044,7 +33124,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f468(s1); + s1 = peg$f560(s1); } s0 = s1; @@ -27055,23 +33135,23 @@ function peg$parse(input, options) { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c364) { + if (input.substr(peg$currPos, 7).toLowerCase() === peg$c446) { s1 = input.substr(peg$currPos, 7); peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e382); + peg$fail(peg$e466); } } if (s1 === peg$FAILED) { - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c97) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c189) { s1 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e97); + peg$fail(peg$e191); } } } @@ -27080,18 +33160,18 @@ function peg$parse(input, options) { s3 = peg$parseKW_TIME(); if (s3 !== peg$FAILED) { s4 = peg$parse__(); - if (input.substr(peg$currPos, 4).toLowerCase() === peg$c158) { + if (input.substr(peg$currPos, 4).toLowerCase() === peg$c254) { s5 = input.substr(peg$currPos, 4); peg$currPos += 4; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e383); + peg$fail(peg$e467); } } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f469(s1); + s0 = peg$f561(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -27122,25 +33202,25 @@ function peg$parse(input, options) { if (s3 !== peg$FAILED) { s4 = peg$parse__(); s5 = []; - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } if (s6 !== peg$FAILED) { while (s6 !== peg$FAILED) { s5.push(s6); - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } } @@ -27157,7 +33237,7 @@ function peg$parse(input, options) { s9 = null; } peg$savedPos = s0; - s0 = peg$f470(s1, s5, s9); + s0 = peg$f562(s1, s5, s9); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -27187,7 +33267,7 @@ function peg$parse(input, options) { s3 = null; } peg$savedPos = s0; - s0 = peg$f471(s1, s3); + s0 = peg$f563(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -27211,25 +33291,25 @@ function peg$parse(input, options) { if (s3 !== peg$FAILED) { s4 = peg$parse__(); s5 = []; - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } if (s6 !== peg$FAILED) { while (s6 !== peg$FAILED) { s5.push(s6); - if (peg$r10.test(input.charAt(peg$currPos))) { + if (peg$r12.test(input.charAt(peg$currPos))) { s6 = input.charAt(peg$currPos); peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { - peg$fail(peg$e206); + peg$fail(peg$e304); } } } @@ -27241,7 +33321,7 @@ function peg$parse(input, options) { s7 = peg$parseRPAREN(); if (s7 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f472(s1, s5); + s0 = peg$f564(s1, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -27266,7 +33346,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f473(s1); + s1 = peg$f565(s1); } s0 = s1; if (s0 === peg$FAILED) { @@ -27287,7 +33367,7 @@ function peg$parse(input, options) { s3 = peg$parsevalue_item(); if (s3 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f474(s1, s3); + s0 = peg$f566(s1, s3); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -27310,7 +33390,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f475(s1); + s1 = peg$f567(s1); } s0 = s1; @@ -27324,7 +33404,7 @@ function peg$parse(input, options) { s1 = peg$parseKW_GEOMETRY(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f476(s1); + s1 = peg$f568(s1); } s0 = s1; @@ -27341,7 +33421,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f477(s1); + s1 = peg$f569(s1); } s0 = s1; @@ -27369,7 +33449,7 @@ function peg$parse(input, options) { s4 = peg$parseRBRAKE(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f478(s1); + s0 = peg$f570(s1); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -27396,7 +33476,7 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f479(s1); + s1 = peg$f571(s1); } s0 = s1; } @@ -27411,7 +33491,29 @@ function peg$parse(input, options) { s1 = peg$parseKW_UUID(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f480(s1); + s1 = peg$f572(s1); + } + s0 = s1; + + return s0; + } + + function peg$parserecord_type() { + var s0, s1; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6).toLowerCase() === peg$c447) { + s1 = input.substr(peg$currPos, 6); + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$e468); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f573(); } s0 = s1; @@ -27540,7 +33642,7 @@ function peg$parse(input, options) { } function createList(head, tail, po = 3) { - const result = [head]; + const result = Array.isArray(head) ? head : [head]; for (let i = 0; i < tail.length; i++) { delete tail[i][po].tableList; delete tail[i][po].columnList; @@ -27615,7 +33717,6 @@ function peg$parse(input, options) { // used for dependency analysis let varList = []; - const tableList = new Set(); const columnList = new Set(); const tableAlias = {}; diff --git a/packages/core/devtools/package.json b/packages/core/devtools/package.json index f4bbf798f..87e57e0dd 100644 --- a/packages/core/devtools/package.json +++ b/packages/core/devtools/package.json @@ -29,7 +29,8 @@ "eslint-plugin-react-hooks": "^4.6.0", "fast-glob": "^3.3.1", "lerna": "^4.0.0", - "prettier": "^3.0.0", + "prettier": "^3.1.1", + "prettier-plugin-sql": "^0.17.0", "pretty-format": "^24.0.0", "pretty-quick": "^3.1.0", "react": "^18.0.0", diff --git a/packages/core/sdk/package.json b/packages/core/sdk/package.json index 7e35ac121..79d2b0810 100644 --- a/packages/core/sdk/package.json +++ b/packages/core/sdk/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "dependencies": { - "axios": "^0.26.1", + "axios": "^1.6.2", "qs": "^6.10.1" }, "devDependencies": { diff --git a/packages/core/server/package.json b/packages/core/server/package.json index 9bae9da33..523b55fa8 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -26,7 +26,8 @@ "@types/ini": "^1.3.31", "@types/koa-send": "^4.1.3", "@types/multer": "^1.4.5", - "axios": "^0.26.1", + "react": "^18.2.0", + "axios": "^1.6.2", "chalk": "^4.1.1", "commander": "^9.2.0", "cron": "^2.4.4", diff --git a/packages/core/server/src/application.ts b/packages/core/server/src/application.ts index 975427fa8..d6b85acf7 100644 --- a/packages/core/server/src/application.ts +++ b/packages/core/server/src/application.ts @@ -44,6 +44,9 @@ import { ApplicationVersion } from './helpers/application-version'; import { Locale } from './locale'; import { Plugin } from './plugin'; import { InstallOptions, PluginManager } from './plugin-manager'; +import { createClient } from 'redis'; +import { nanoid } from 'nanoid'; +import _ from 'lodash'; import { DataSourceManager, SequelizeDataSource } from '@nocobase/data-source-manager'; import packageJson from '../package.json'; @@ -157,6 +160,13 @@ export class Application exten private _maintainingCommandStatus: MaintainingCommandStatus; private _maintainingStatusBeforeCommand: MaintainingCommandStatus | null; private _actionCommand: Command; + private redisClient = createClient({ + url: process.env.REDIS_URL ?? 'redis://127.0.0.1:6379', + }); + private redisPubClient = this.redisClient.duplicate(); + private redisSubClient = this.redisClient.duplicate(); + static KEY_CORE_APP_PREFIX = 'KEY_CORE_APP_'; + private currentId = nanoid(); constructor(public options: ApplicationOptions) { super(); @@ -164,6 +174,20 @@ export class Application exten this.rawOptions = this.name == 'main' ? lodash.cloneDeep(options) : {}; this.init(); + Promise.all([this.redisClient.connect(), this.redisPubClient.connect(), this.redisSubClient.connect()]) + .then(() => { + console.log(`[APPLICATION] ${this.name} redis connected.`); + this.redisSubClient.SUBSCRIBE(Application.KEY_CORE_APP_PREFIX + this.name, async (data) => { + const payload = JSON.parse(data); + if (payload.id !== this.currentId) { + this.runAsCLI(payload.argv, payload.options, false); + } + }); + }) + .catch((err) => { + console.error(err); + }); + this._appSupervisor.addApp(this); } @@ -605,7 +629,26 @@ export class Application exten await this.pm.loadCommands(); } - async runAsCLI(argv = process.argv, options?: ParseOptions & { throwError?: boolean; reqId?: string }) { + async runAsCLI( + argv = process.argv, + options?: ParseOptions & { throwError?: boolean; reqId?: string }, + broadcast = true, + ) { + if (broadcast) { + if (_.first(argv) === 'pm' || _.first(argv) === 'restart') { + console.log('[broadcast]:', argv); + setTimeout(() => { + this.redisPubClient.PUBLISH( + Application.KEY_CORE_APP_PREFIX + this.name, + JSON.stringify({ + id: this.currentId, + argv: ['restart'], + options: { from: 'user' }, + }), + ); + }, 2000); + } + } if (this.activatedCommand) { return; } diff --git a/packages/core/server/src/gateway/ws-server.ts b/packages/core/server/src/gateway/ws-server.ts index c50808d9c..3f8318863 100644 --- a/packages/core/server/src/gateway/ws-server.ts +++ b/packages/core/server/src/gateway/ws-server.ts @@ -5,6 +5,7 @@ import { IncomingMessage } from 'http'; import { AppSupervisor } from '../app-supervisor'; import { applyErrorWithArgs, getErrorWithCode } from './errors'; import lodash from 'lodash'; +import { createClient } from 'redis'; import { Logger } from '@nocobase/logger'; declare class WebSocketWithId extends WebSocket { @@ -27,11 +28,32 @@ function getPayloadByErrorCode(code, options) { export class WSServer { wss: WebSocket.Server; webSocketClients = new Map(); + private redisClient = createClient({ + url: process.env.REDIS_URL ?? 'redis://127.0.0.1:6379', + }); + private redisPubClient = this.redisClient.duplicate(); + private redisSubClient = this.redisClient.duplicate(); + static KEY_CORE_MESSAGE = 'KEY_CORE_MESSAGE'; + private currentId = nanoid(); logger: Logger; constructor() { this.wss = new WebSocketServer({ noServer: true }); + Promise.all([this.redisClient.connect(), this.redisPubClient.connect(), this.redisSubClient.connect()]) + .then(() => { + console.log('[WSServer]: redis connected.'); + this.redisSubClient.SUBSCRIBE(WSServer.KEY_CORE_MESSAGE, async (data) => { + const payload = JSON.parse(data); + if (payload.id !== this.currentId) { + this.sendToConnectionsByTag(payload.tagName, payload.tagValue, payload.sendMessage, false); + } + }); + }) + .catch((err) => { + console.error(err); + }); + this.wss.on('connection', (ws: WebSocketWithId, request: IncomingMessage) => { const client = this.addNewConnection(ws, request); @@ -175,7 +197,18 @@ export class WSServer { client.ws.send(JSON.stringify(sendMessage)); } - sendToConnectionsByTag(tagName: string, tagValue: string, sendMessage: object) { + sendToConnectionsByTag(tagName: string, tagValue: string, sendMessage: object, broadcast = true) { + if (broadcast) { + this.redisPubClient.PUBLISH( + WSServer.KEY_CORE_MESSAGE, + JSON.stringify({ + id: this.currentId, + tagName, + tagValue, + sendMessage, + }), + ); + } this.loopThroughConnections((client: WebSocketClient) => { if (client.tags.includes(`${tagName}#${tagValue}`)) { this.sendMessageToConnection(client, sendMessage); diff --git a/packages/core/server/src/plugin-manager/deps.ts b/packages/core/server/src/plugin-manager/deps.ts index 43eb9bce4..0d108c523 100644 --- a/packages/core/server/src/plugin-manager/deps.ts +++ b/packages/core/server/src/plugin-manager/deps.ts @@ -44,7 +44,7 @@ const deps: Record = { 'pg-hstore': '2.x', sqlite3: '5.x', supertest: '6.x', - axios: '0.26.x', + axios: '1.x', '@emotion/css': '11.x', ahooks: '3.x', lodash: '4.x', diff --git a/packages/core/utils/src/dayjs.ts b/packages/core/utils/src/dayjs.ts index c501f172c..35341f242 100644 --- a/packages/core/utils/src/dayjs.ts +++ b/packages/core/utils/src/dayjs.ts @@ -12,6 +12,7 @@ import utc from 'dayjs/plugin/utc'; import weekOfYear from 'dayjs/plugin/weekOfYear'; import weekYear from 'dayjs/plugin/weekYear'; import weekday from 'dayjs/plugin/weekday'; +import calendar from 'dayjs/plugin/calendar'; dayjs.extend(weekday); dayjs.extend(localeData); @@ -26,5 +27,6 @@ dayjs.extend(weekOfYear); dayjs.extend(weekYear); dayjs.extend(customParseFormat); dayjs.extend(advancedFormat); +dayjs.extend(calendar); export { dayjs }; diff --git a/packages/core/utils/src/decorators.ts b/packages/core/utils/src/decorators.ts new file mode 100644 index 000000000..ce481fb17 --- /dev/null +++ b/packages/core/utils/src/decorators.ts @@ -0,0 +1,61 @@ +import Container, { Inject, Service } from './typedi'; + +// declare type ClassDecorator = (target: TFunction) => TFunction | void; +// declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; +// declare type MethodDecorator = ( +// target: Object, +// propertyKey: string | symbol, +// descriptor: TypedPropertyDescriptor, +// ) => TypedPropertyDescriptor | void; +// declare type ParameterDecorator = ( +// target: Object, +// propertyKey: string | symbol | undefined, +// parameterIndex: number, +// ) => void; + +export interface ActionDef { + type: string; + resourceName?: string; + actionName?: string; + method?: string; +} + +// init actions +Container.set({ id: 'actions', value: new Map() }); + +export function App() { + return Inject('app'); +} + +export function Db() { + return Inject('db'); +} + +export function Controller(name: string) { + return function (target: any) { + const serviceOptions = { id: 'controller', multiple: true }; + Service(serviceOptions)(target); + const actions = Container.get('actions') as Map; + if (!actions.has(target)) { + actions.set(target, []); + } + actions.get(target).push({ + type: 'resource', + resourceName: name, + }); + }; +} + +export function Action(name: string) { + return function (target: Object, propertyKey: string, descriptor: PropertyDescriptor) { + const actions = Container.get('actions') as Map; + if (!actions.has(target.constructor)) { + actions.set(target.constructor, []); + } + actions.get(target.constructor).push({ + type: 'action', + method: propertyKey, + actionName: name, + }); + }; +} diff --git a/packages/core/utils/src/index.ts b/packages/core/utils/src/index.ts index 326f9890e..2319b5346 100644 --- a/packages/core/utils/src/index.ts +++ b/packages/core/utils/src/index.ts @@ -23,5 +23,7 @@ export * from './requireModule'; export * from './toposort'; export * from './uid'; export * from './url'; +export * from './typedi'; +export * from './decorators'; export { dayjs, lodash }; diff --git a/packages/core/utils/src/typedi/container-instance.class.ts b/packages/core/utils/src/typedi/container-instance.class.ts new file mode 100644 index 000000000..8eb175e1a --- /dev/null +++ b/packages/core/utils/src/typedi/container-instance.class.ts @@ -0,0 +1,488 @@ +import { ServiceNotFoundError } from './error/service-not-found.error'; +import { CannotInstantiateValueError } from './error/cannot-instantiate-value.error'; +import { Token } from './token.class'; +import { Constructable } from './types/constructable.type'; +import { ServiceIdentifier } from './types/service-identifier.type'; +import { ServiceMetadata } from './interfaces/service-metadata.interface'; +import { ServiceOptions } from './interfaces/service-options.interface'; +import { EMPTY_VALUE } from './empty.const'; +import { ContainerIdentifier } from './types/container-identifier.type'; +import { Handler } from './interfaces/handler.interface'; +import { ContainerRegistry } from './container-registry.class'; +import { ContainerScope } from './types/container-scope.type'; + +/** + * TypeDI can have multiple containers. + * One container is ContainerInstance. + */ +export class ContainerInstance { + /** Container instance id. */ + public readonly id!: ContainerIdentifier; + + /** Metadata for all registered services in this container. */ + private metadataMap: Map> = new Map(); + + /** + * Services registered with 'multiple: true' are saved as simple services + * with a generated token and the mapping between the original ID and the + * generated one is stored here. This is handled like this to allow simplifying + * the inner workings of the service instance. + */ + private multiServiceIds: Map[]; scope: ContainerScope }> = new Map(); + + /** + * All registered handlers. The @Inject() decorator uses handlers internally to mark a property for injection. + **/ + private readonly handlers: Handler[] = []; + + /** + * The default global container. By default services are registered into this + * container when registered via `Container.set()` or `@Service` decorator. + */ + private static _default: ContainerInstance; + + public static get default(): ContainerInstance { + if (!this._default) { + this._default = new ContainerInstance('default'); + ContainerRegistry.registerContainer(this._default); + } + return this._default; + } + + /** + * Indicates if the container has been disposed or not. + * Any function call should fail when called after being disposed. + * + * NOTE: Currently not in used + */ + private disposed = false; + + constructor(id: ContainerIdentifier) { + this.id = id; + + if (id !== 'default') { + ContainerRegistry.registerContainer(this); + + /** + * TODO: This is to replicate the old functionality. This should be copied only + * TODO: if the container decides to inherit registered classes from a parent container. + */ + this.handlers = ContainerInstance.default.handlers || []; + } + } + + /** + * Checks if the service with given name or type is registered service container. + * Optionally, parameters can be passed in case if instance is initialized in the container for the first time. + */ + public has(identifier: ServiceIdentifier): boolean { + this.throwIfDisposed(); + + return !!this.metadataMap.has(identifier) || !!this.multiServiceIds.has(identifier); + } + + /** + * Retrieves the service with given name or type from the service container. + * Optionally, parameters can be passed in case if instance is initialized in the container for the first time. + */ + public get(identifier: ServiceIdentifier): T { + this.throwIfDisposed(); + + const global = ContainerInstance.default.metadataMap.get(identifier); + const local = this.metadataMap.get(identifier); + /** If the service is registered as global we load it from there, otherwise we use the local one. */ + const metadata = global?.scope === 'singleton' ? global : local; + + /** This should never happen as multi services are masked with custom token in Container.set. */ + if (metadata && metadata.multiple === true) { + throw new Error(`Cannot resolve multiple values for ${identifier.toString()} service!`); + } + + /** Otherwise it's returned from the current container. */ + if (metadata) { + return this.getServiceValue(metadata); + } + + /** + * If it's the first time requested in the child container we load it from parent and set it. + * TODO: This will be removed with the container inheritance rework. + */ + if (global && this !== ContainerInstance.default) { + const clonedService = { ...global }; + clonedService.value = EMPTY_VALUE; + + /** + * We need to immediately set the empty value from the root container + * to prevent infinite lookup in cyclic dependencies. + */ + this.set(clonedService); + + const value = this.getServiceValue(clonedService); + this.set({ ...clonedService, value }); + + return value; + } + + throw new ServiceNotFoundError(identifier); + } + + /** + * Gets all instances registered in the container of the given service identifier. + * Used when service defined with multiple: true flag. + */ + public getMany(identifier: ServiceIdentifier): T[] { + this.throwIfDisposed(); + + const globalIdMap = ContainerInstance.default.multiServiceIds.get(identifier); + const localIdMap = this.multiServiceIds.get(identifier); + + /** + * If the service is registered as singleton we load it from default + * container, otherwise we use the local one. + */ + if (globalIdMap?.scope === 'singleton') { + return globalIdMap.tokens.map((generatedId) => ContainerInstance.default.get(generatedId)); + } + + if (localIdMap) { + return localIdMap.tokens.map((generatedId) => this.get(generatedId)); + } + + throw new ServiceNotFoundError(identifier); + } + + /** + * Sets a value for the given type or service name in the container. + */ + public set(serviceOptions: ServiceOptions): this { + this.throwIfDisposed(); + + /** + * If the service is marked as singleton, we set it in the default container. + * (And avoid an infinite loop via checking if we are in the default container or not.) + */ + if (serviceOptions.scope === 'singleton' && ContainerInstance.default !== this) { + ContainerInstance.default.set(serviceOptions); + + return this; + } + + const newMetadata: ServiceMetadata = { + /** + * Typescript cannot understand that if ID doesn't exists then type must exists based on the + * typing so we need to explicitly cast this to a `ServiceIdentifier` + */ + id: ((serviceOptions as any).id || (serviceOptions as any).type) as ServiceIdentifier, + type: (serviceOptions as ServiceMetadata).type || null, + factory: (serviceOptions as ServiceMetadata).factory, + value: (serviceOptions as ServiceMetadata).value || EMPTY_VALUE, + multiple: serviceOptions.multiple || false, + eager: serviceOptions.eager || false, + scope: serviceOptions.scope || 'container', + /** We allow overriding the above options via the received config object. */ + ...serviceOptions, + referencedBy: new Map().set(this.id, this), + }; + + /** If the incoming metadata is marked as multiple we mask the ID and continue saving as single value. */ + if (serviceOptions.multiple) { + const maskedToken = new Token(`MultiMaskToken-${newMetadata.id.toString()}`); + const existingMultiGroup = this.multiServiceIds.get(newMetadata.id); + + if (existingMultiGroup) { + existingMultiGroup.tokens.push(maskedToken); + } else { + this.multiServiceIds.set(newMetadata.id, { scope: newMetadata.scope, tokens: [maskedToken] }); + } + + /** + * We mask the original metadata with this generated ID, mark the service + * as and continue multiple: false and continue. Marking it as + * non-multiple is important otherwise Container.get would refuse to + * resolve the value. + */ + newMetadata.id = maskedToken; + newMetadata.multiple = false; + } + + const existingMetadata = this.metadataMap.get(newMetadata.id); + + if (existingMetadata) { + /** Service already exists, we overwrite it. (This is legacy behavior.) */ + // TODO: Here we should differentiate based on the received set option. + Object.assign(existingMetadata, newMetadata); + } else { + /** This service hasn't been registered yet, so we register it. */ + this.metadataMap.set(newMetadata.id, newMetadata); + } + + /** + * If the service is eager, we need to create an instance immediately except + * when the service is also marked as transient. In that case we ignore + * the eager flag to prevent creating a service what cannot be disposed later. + */ + if (newMetadata.eager && newMetadata.scope !== 'transient') { + this.get(newMetadata.id); + } + + return this; + } + + /** + * Removes services with a given service identifiers. + */ + public remove(identifierOrIdentifierArray: ServiceIdentifier | ServiceIdentifier[]): this { + this.throwIfDisposed(); + + if (Array.isArray(identifierOrIdentifierArray)) { + identifierOrIdentifierArray.forEach((id) => this.remove(id)); + } else { + const serviceMetadata = this.metadataMap.get(identifierOrIdentifierArray); + + if (serviceMetadata) { + this.disposeServiceInstance(serviceMetadata); + this.metadataMap.delete(identifierOrIdentifierArray); + } + } + + return this; + } + + /** + * Gets a separate container instance for the given instance id. + */ + public of(containerId: ContainerIdentifier = 'default'): ContainerInstance { + this.throwIfDisposed(); + + if (containerId === 'default') { + return ContainerInstance.default; + } + + let container: ContainerInstance; + + if (ContainerRegistry.hasContainer(containerId)) { + container = ContainerRegistry.getContainer(containerId); + } else { + /** + * This is deprecated functionality, for now we create the container if it's doesn't exists. + * This will be reworked when container inheritance is reworked. + */ + container = new ContainerInstance(containerId); + } + + return container; + } + + /** + * Registers a new handler. + */ + public registerHandler(handler: Handler): ContainerInstance { + this.handlers.push(handler); + return this; + } + + /** + * Helper method that imports given services. + */ + /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + public import(services: Function[]): ContainerInstance { + this.throwIfDisposed(); + + return this; + } + + /** + * Completely resets the container by removing all previously registered services from it. + */ + public reset(options: { strategy: 'resetValue' | 'resetServices' } = { strategy: 'resetValue' }): this { + this.throwIfDisposed(); + + switch (options.strategy) { + case 'resetValue': + this.metadataMap.forEach((service) => this.disposeServiceInstance(service)); + break; + case 'resetServices': + this.metadataMap.forEach((service) => this.disposeServiceInstance(service)); + this.metadataMap.clear(); + this.multiServiceIds.clear(); + break; + default: + throw new Error('Received invalid reset strategy.'); + } + return this; + } + + public async dispose(): Promise { + this.reset({ strategy: 'resetServices' }); + + /** We mark the container as disposed, forbidding any further interaction with it. */ + this.disposed = true; + + /** + * Placeholder, this function returns a promise in preparation to support async services. + */ + await Promise.resolve(); + } + + private throwIfDisposed() { + if (this.disposed) { + // TODO: Use custom error. + throw new Error('Cannot use container after it has been disposed.'); + } + } + + /** + * Gets the value belonging to passed in `ServiceMetadata` instance. + * + * - if `serviceMetadata.value` is already set it is immediately returned + * - otherwise the requested type is resolved to the value saved to `serviceMetadata.value` and returned + */ + private getServiceValue(serviceMetadata: ServiceMetadata): any { + let value: unknown = EMPTY_VALUE; + + /** + * If the service value has been set to anything prior to this call we return that value. + * NOTE: This part builds on the assumption that transient dependencies has no value set ever. + */ + if (serviceMetadata.value !== EMPTY_VALUE) { + return serviceMetadata.value; + } + + /** If both factory and type is missing, we cannot resolve the requested ID. */ + if (!serviceMetadata.factory && typeof serviceMetadata.type === 'undefined') { + throw new CannotInstantiateValueError(serviceMetadata.id); + } + + /** + * If a factory is defined it takes priority over creating an instance via `new`. + * The return value of the factory is not checked, we believe by design that the user knows what he/she is doing. + */ + if (serviceMetadata.factory) { + /** + * If we received the factory in the [Constructable, "functionName"] format, we need to create the + * factory first and then call the specified function on it. + */ + if (serviceMetadata.factory instanceof Array) { + let factoryInstance; + + try { + /** Try to get the factory from TypeDI first, if failed, fall back to simply initiating the class. */ + factoryInstance = this.get(serviceMetadata.factory[0]); + } catch (error) { + if (error instanceof ServiceNotFoundError) { + factoryInstance = new serviceMetadata.factory[0](); + } else { + throw error; + } + } + + value = factoryInstance[serviceMetadata.factory[1]](this, serviceMetadata.id); + } else { + /** If only a simple function was provided we simply call it. */ + value = serviceMetadata.factory(this, serviceMetadata.id); + } + } else if (typeof serviceMetadata.type === 'function') { + value = new serviceMetadata.type(); + } + + /** If this is not a transient service, and we resolved something, then we set it as the value. */ + if (serviceMetadata.scope !== 'transient' && value !== EMPTY_VALUE) { + serviceMetadata.value = value; + } + + if (value === EMPTY_VALUE) { + /** This branch should never execute, but better to be safe than sorry. */ + throw new CannotInstantiateValueError(serviceMetadata.id); + } + + if (serviceMetadata.type) { + this.applyPropertyHandlers(serviceMetadata.type, value as Record); + } + + return value; + } + + /** + * Initializes all parameter types for a given target service class. + */ + private initializeParams(target: Function, paramTypes: any[]): unknown[] { + return paramTypes.map((paramType, index) => { + const paramHandler = + this.handlers.find((handler) => { + /** + * @Inject()-ed values are stored as parameter handlers and they reference their target + * when created. So when a class is extended the @Inject()-ed values are not inherited + * because the handler still points to the old object only. + * + * As a quick fix a single level parent lookup is added via `Object.getPrototypeOf(target)`, + * however this should be updated to a more robust solution. + * + * TODO: Add proper inheritance handling: either copy the handlers when a class is registered what + * TODO: has it's parent already registered as dependency or make the lookup search up to the base Object. + */ + return handler.object === target && handler.index === index; + }) || + this.handlers.find((handler) => { + return handler.object === Object.getPrototypeOf(target) && handler.index === index; + }); + + if (paramHandler) return paramHandler.value(this); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + if (paramType && paramType.name && !this.isPrimitiveParamType(paramType.name)) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + return this.get(paramType); + } + + return undefined; + }); + } + + /** + * Checks if given parameter type is primitive type or not. + */ + private isPrimitiveParamType(paramTypeName: string): boolean { + return ['string', 'boolean', 'number', 'object'].includes(paramTypeName.toLowerCase()); + } + + /** + * Applies all registered handlers on a given target class. + */ + private applyPropertyHandlers(target: Function, instance: { [key: string]: any }) { + this.handlers.forEach((handler) => { + if (typeof handler.index === 'number') return; + if (handler.object.constructor !== target && !(target.prototype instanceof handler.object.constructor)) return; + + if (handler.propertyName) { + instance[handler.propertyName] = handler.value(this); + } + }); + } + + /** + * Checks if the given service metadata contains a destroyable service instance and destroys it in place. If the service + * contains a callable function named `destroy` it is called but not awaited and the return value is ignored.. + * + * @param serviceMetadata the service metadata containing the instance to destroy + * @param force when true the service will be always destroyed even if it's cannot be re-created + */ + private disposeServiceInstance(serviceMetadata: ServiceMetadata, force = false) { + this.throwIfDisposed(); + + /** We reset value only if we can re-create it (aka type or factory exists). */ + const shouldResetValue = force || !!serviceMetadata.type || !!serviceMetadata.factory; + + if (shouldResetValue) { + /** If we wound a function named destroy we call it without any params. */ + if (typeof (serviceMetadata?.value as Record)['dispose'] === 'function') { + try { + (serviceMetadata.value as { dispose: CallableFunction }).dispose(); + } catch (error) { + /** We simply ignore the errors from the destroy function. */ + } + } + + serviceMetadata.value = EMPTY_VALUE; + } + } +} diff --git a/packages/core/utils/src/typedi/container-registry.class.ts b/packages/core/utils/src/typedi/container-registry.class.ts new file mode 100644 index 000000000..53c18d43d --- /dev/null +++ b/packages/core/utils/src/typedi/container-registry.class.ts @@ -0,0 +1,92 @@ +import { ContainerInstance } from './container-instance.class'; +import { ContainerIdentifier } from './types/container-identifier.type'; + +/** + * The container registry is responsible for holding the default and every + * created container instance for later access. + * + * _Note: This class is for internal use and it's API may break in minor or + * patch releases without warning._ + */ +export class ContainerRegistry { + /** + * The list of all known container. Created containers are automatically added + * to this list. Two container cannot be registered with the same ID. + * + * This map doesn't contains the default container. + */ + private static readonly containerMap: Map = new Map(); + + /** + * Registers the given container instance or throws an error. + * + * _Note: This function is auto-called when a Container instance is created, + * it doesn't need to be called manually!_ + * + * @param container the container to add to the registry + */ + public static registerContainer(container: ContainerInstance): void { + if (container instanceof ContainerInstance === false) { + // TODO: Create custom error for this. + throw new Error('Only ContainerInstance instances can be registered.'); + } + + if (ContainerRegistry.containerMap.has(container.id)) { + // TODO: Create custom error for this. + throw new Error('Cannot register container with same ID.'); + } + + ContainerRegistry.containerMap.set(container.id, container); + } + + /** + * Returns true if a container exists with the given ID or false otherwise. + * + * @param container the ID of the container + */ + public static hasContainer(id: ContainerIdentifier): boolean { + return ContainerRegistry.containerMap.has(id); + } + + /** + * Returns the container for requested ID or throws an error if no container + * is registered with the given ID. + * + * @param container the ID of the container + */ + public static getContainer(id: ContainerIdentifier): ContainerInstance { + const registeredContainer = this.containerMap.get(id); + + if (registeredContainer === undefined) { + // TODO: Create custom error for this. + throw new Error('No container is registered with the given ID.'); + } + + return registeredContainer; + } + + /** + * Removes the given container from the registry and disposes all services + * registered only in this container. + * + * This function throws an error if no + * - container exists with the given ID + * - any of the registered services threw an error during it's disposal + * + * @param container the container to remove from the registry + */ + public static async removeContainer(container: ContainerInstance): Promise { + const registeredContainer = ContainerRegistry.containerMap.get(container.id); + + if (registeredContainer === undefined) { + // TODO: Create custom error for this. + throw new Error('No container is registered with the given ID.'); + } + + /** We remove the container first. */ + ContainerRegistry.containerMap.delete(container.id); + + /** We dispose all registered classes in the container. */ + await registeredContainer.dispose(); + } +} diff --git a/packages/core/utils/src/typedi/decorators/inject-many.decorator.ts b/packages/core/utils/src/typedi/decorators/inject-many.decorator.ts new file mode 100644 index 000000000..371855d5e --- /dev/null +++ b/packages/core/utils/src/typedi/decorators/inject-many.decorator.ts @@ -0,0 +1,42 @@ +import { Token } from '../token.class'; +import { CannotInjectValueError } from '../error/cannot-inject-value.error'; +import { resolveToTypeWrapper } from '../utils/resolve-to-type-wrapper.util'; +import { Constructable } from '../types/constructable.type'; +import { ServiceIdentifier } from '../types/service-identifier.type'; +import { ContainerInstance } from '../container-instance.class'; + +/** + * Injects a list of services into a class property or constructor parameter. + */ +export function InjectMany(): Function; +export function InjectMany(type?: (type?: any) => Function): Function; +export function InjectMany(serviceName?: string): Function; +export function InjectMany(token: Token): Function; +export function InjectMany( + typeOrIdentifier?: ((type?: never) => Constructable) | ServiceIdentifier, +): Function { + return function (target: Object, propertyName: string | Symbol, index?: number): void { + const typeWrapper = resolveToTypeWrapper(typeOrIdentifier, target, propertyName, index); + + /** If no type was inferred, or the general Object type was inferred we throw an error. */ + if (typeWrapper === undefined || typeWrapper.eagerType === undefined || typeWrapper.eagerType === Object) { + throw new CannotInjectValueError(target as Constructable, propertyName as string); + } + + ContainerInstance.default.registerHandler({ + object: target as Constructable, + propertyName: propertyName as string, + index: index, + value: (containerInstance) => { + const evaluatedLazyType = typeWrapper.lazyType(); + + /** If no type was inferred lazily, or the general Object type was inferred we throw an error. */ + if (evaluatedLazyType === undefined || evaluatedLazyType === Object) { + throw new CannotInjectValueError(target as Constructable, propertyName as string); + } + + return containerInstance.getMany(evaluatedLazyType); + }, + }); + }; +} diff --git a/packages/core/utils/src/typedi/decorators/inject.decorator.ts b/packages/core/utils/src/typedi/decorators/inject.decorator.ts new file mode 100644 index 000000000..0b5580a56 --- /dev/null +++ b/packages/core/utils/src/typedi/decorators/inject.decorator.ts @@ -0,0 +1,42 @@ +import { Token } from '../token.class'; +import { CannotInjectValueError } from '../error/cannot-inject-value.error'; +import { ServiceIdentifier } from '../types/service-identifier.type'; +import { Constructable } from '../types/constructable.type'; +import { resolveToTypeWrapper } from '../utils/resolve-to-type-wrapper.util'; +import { ContainerInstance } from '../container-instance.class'; + +/** + * Injects a service into a class property or constructor parameter. + */ +export function Inject(): Function; +export function Inject(typeFn: (type?: never) => Constructable): Function; +export function Inject(serviceName?: string): Function; +export function Inject(token: Token): Function; +export function Inject( + typeOrIdentifier?: ((type?: never) => Constructable) | ServiceIdentifier, +): ParameterDecorator | PropertyDecorator { + return function (target: Object, propertyName: string | Symbol, index?: number): void { + const typeWrapper = resolveToTypeWrapper(typeOrIdentifier, target, propertyName, index); + + /** If no type was inferred, or the general Object type was inferred we throw an error. */ + if (typeWrapper === undefined || typeWrapper.eagerType === undefined || typeWrapper.eagerType === Object) { + throw new CannotInjectValueError(target as Constructable, propertyName as string); + } + + ContainerInstance.default.registerHandler({ + object: target as Constructable, + propertyName: propertyName as string, + index: index, + value: (containerInstance) => { + const evaluatedLazyType = typeWrapper.lazyType(); + + /** If no type was inferred lazily, or the general Object type was inferred we throw an error. */ + if (evaluatedLazyType === undefined || evaluatedLazyType === Object) { + throw new CannotInjectValueError(target as Constructable, propertyName as string); + } + + return containerInstance.get(evaluatedLazyType); + }, + }); + }; +} diff --git a/packages/core/utils/src/typedi/decorators/service.decorator.ts b/packages/core/utils/src/typedi/decorators/service.decorator.ts new file mode 100644 index 000000000..49f56167b --- /dev/null +++ b/packages/core/utils/src/typedi/decorators/service.decorator.ts @@ -0,0 +1,28 @@ +import { ServiceMetadata } from '../interfaces/service-metadata.interface'; +import { ServiceOptions } from '../interfaces/service-options.interface'; +import { EMPTY_VALUE } from '../empty.const'; +import { Constructable } from '../types/constructable.type'; +import { ContainerInstance } from '../container-instance.class'; + +/** + * Marks class as a service that can be injected using Container. + */ +/* eslint-disable-next-line @typescript-eslint/no-unused-vars */ +export function Service(): Function; +export function Service(options: ServiceOptions): Function; +export function Service(options: ServiceOptions = {}): ClassDecorator { + return (targetConstructor) => { + const serviceMetadata: ServiceMetadata = { + id: options.id || targetConstructor, + type: targetConstructor as unknown as Constructable, + factory: (options as any).factory || undefined, + multiple: options.multiple || false, + eager: options.eager || false, + scope: options.scope || 'container', + referencedBy: new Map().set(ContainerInstance.default.id, ContainerInstance.default), + value: EMPTY_VALUE, + }; + + ContainerInstance.default.set(serviceMetadata); + }; +} diff --git a/packages/core/utils/src/typedi/empty.const.ts b/packages/core/utils/src/typedi/empty.const.ts new file mode 100644 index 000000000..7203f8f4e --- /dev/null +++ b/packages/core/utils/src/typedi/empty.const.ts @@ -0,0 +1,6 @@ +/** + * Indicates that a service has not been initialized yet. + * + * _Note: This value is for internal use only._ + */ +export const EMPTY_VALUE = Symbol('EMPTY_VALUE'); diff --git a/packages/core/utils/src/typedi/error/cannot-inject-value.error.ts b/packages/core/utils/src/typedi/error/cannot-inject-value.error.ts new file mode 100644 index 000000000..affb83735 --- /dev/null +++ b/packages/core/utils/src/typedi/error/cannot-inject-value.error.ts @@ -0,0 +1,22 @@ +import { Constructable } from '../types/constructable.type'; + +/** + * Thrown when DI cannot inject value into property decorated by @Inject decorator. + */ +export class CannotInjectValueError extends Error { + public name = 'CannotInjectValueError'; + + get message(): string { + return ( + `Cannot inject value into "${this.target.constructor.name}.${this.propertyName}". ` + + `Please make sure you setup reflect-metadata properly and you don't use interfaces without service tokens as injection value.` + ); + } + + constructor( + private target: Constructable, + private propertyName: string, + ) { + super(); + } +} diff --git a/packages/core/utils/src/typedi/error/cannot-instantiate-value.error.ts b/packages/core/utils/src/typedi/error/cannot-instantiate-value.error.ts new file mode 100644 index 000000000..9d784cac3 --- /dev/null +++ b/packages/core/utils/src/typedi/error/cannot-instantiate-value.error.ts @@ -0,0 +1,34 @@ +import { ServiceIdentifier } from '../types/service-identifier.type'; +import { Token } from '../token.class'; + +/** + * Thrown when DI cannot inject value into property decorated by @Inject decorator. + */ +export class CannotInstantiateValueError extends Error { + public name = 'CannotInstantiateValueError'; + + /** Normalized identifier name used in the error message. */ + private normalizedIdentifier = ''; + + get message(): string { + return ( + `Cannot instantiate the requested value for the "${this.normalizedIdentifier}" identifier. ` + + `The related metadata doesn't contain a factory or a type to instantiate.` + ); + } + + constructor(identifier: ServiceIdentifier) { + super(); + + // TODO: Extract this to a helper function and share between this and NotFoundError. + if (typeof identifier === 'string') { + this.normalizedIdentifier = identifier; + } else if (identifier instanceof Token) { + this.normalizedIdentifier = `Token<${identifier.name || 'UNSET_NAME'}>`; + } else if (identifier && (identifier.name || identifier.prototype?.name)) { + this.normalizedIdentifier = + `MaybeConstructable<${identifier.name}>` || + `MaybeConstructable<${(identifier.prototype as { name: string })?.name}>`; + } + } +} diff --git a/packages/core/utils/src/typedi/error/service-not-found.error.ts b/packages/core/utils/src/typedi/error/service-not-found.error.ts new file mode 100644 index 000000000..741c14264 --- /dev/null +++ b/packages/core/utils/src/typedi/error/service-not-found.error.ts @@ -0,0 +1,33 @@ +import { ServiceIdentifier } from '../types/service-identifier.type'; +import { Token } from '../token.class'; + +/** + * Thrown when requested service was not found. + */ +export class ServiceNotFoundError extends Error { + public name = 'ServiceNotFoundError'; + + /** Normalized identifier name used in the error message. */ + private normalizedIdentifier = ''; + + get message(): string { + return ( + `Service with "${this.normalizedIdentifier}" identifier was not found in the container. ` + + `Register it before usage via explicitly calling the "Container.set" function or using the "@Service()" decorator.` + ); + } + + constructor(identifier: ServiceIdentifier) { + super(); + + if (typeof identifier === 'string') { + this.normalizedIdentifier = identifier; + } else if (identifier instanceof Token) { + this.normalizedIdentifier = `Token<${identifier.name || 'UNSET_NAME'}>`; + } else if (identifier && (identifier.name || identifier.prototype?.name)) { + this.normalizedIdentifier = + `MaybeConstructable<${identifier.name}>` || + `MaybeConstructable<${(identifier.prototype as { name: string })?.name}>`; + } + } +} diff --git a/packages/core/utils/src/typedi/index.ts b/packages/core/utils/src/typedi/index.ts new file mode 100644 index 000000000..dc23d68ad --- /dev/null +++ b/packages/core/utils/src/typedi/index.ts @@ -0,0 +1,22 @@ +import { ContainerInstance } from './container-instance.class'; + +export * from './decorators/inject-many.decorator'; +export * from './decorators/inject.decorator'; +export * from './decorators/service.decorator'; + +export * from './error/cannot-inject-value.error'; +export * from './error/cannot-instantiate-value.error'; +export * from './error/service-not-found.error'; + +export { Handler } from './interfaces/handler.interface'; +export { ServiceMetadata } from './interfaces/service-metadata.interface'; +export { ServiceOptions } from './interfaces/service-options.interface'; +export { Constructable } from './types/constructable.type'; +export { ServiceIdentifier } from './types/service-identifier.type'; + +export { ContainerInstance } from './container-instance.class'; +export { Token } from './token.class'; + +/** We export the default container under the Container alias. */ +export const Container = ContainerInstance.default; +export default Container; diff --git a/packages/core/utils/src/typedi/interfaces/container-options.interface.ts b/packages/core/utils/src/typedi/interfaces/container-options.interface.ts new file mode 100644 index 000000000..490c0b1f3 --- /dev/null +++ b/packages/core/utils/src/typedi/interfaces/container-options.interface.ts @@ -0,0 +1,48 @@ +export interface ContainerOptions { + /** + * Controls the behavior when a service is already registered with the same ID. The following values are allowed: + * + * - `throw` - a `ContainerCannotBeCreatedError` error is raised + * - `overwrite` - the previous container is disposed and a new one is created + * - `returnExisting` - returns the existing container or raises a `ContainerCannotBeCreatedError` error if the + * specified options differ from the options of the existing container + * + * The default value is `returnExisting`. + */ + onConflict: 'throw' | 'overwrite' | 'returnExisting'; + + /** + * Controls the behavior when a requested type doesn't exists in the current container. The following values are allowed: + * + * - `allowLookup` - the parent container will be checked for the dependency + * - `localOnly` - a `ServiceNotFoundError` error is raised + * + * The default value is `allowLookup`. + */ + lookupStrategy: 'allowLookup' | 'localOnly'; + + /** + * Enables the lookup for global (singleton) services before checking in the current container. By default every + * type is first checked in the default container to return singleton services. This check bypasses the lookup strategy, + * set in the container so if this behavior is not desired it can be disabled via this flag. + * + * The default value is `true`. + */ + allowSingletonLookup: boolean; + + /** + * Controls how the child container inherits the service definitions from it's parent. The following values are allowed: + * + * - `none` - no metadata is inherited + * - `definitionOnly` - only metadata is inherited, a new instance will be created for each class + * - eager classes created as soon as the container is created + * - non-eager classes are created the first time they are requested + * - `definitionWithValues` - both metadata and service instances are inherited + * - when parent class is disposed the instances in this container are preserved + * - if a service is registered but not created yet, it will be shared when created between the two container + * - newly registered services won't be shared between the two container + * + * The default value is `none`. + */ + inheritanceStrategy: 'none' | 'definitionOnly' | 'definitionWithValues'; +} diff --git a/packages/core/utils/src/typedi/interfaces/handler.interface.ts b/packages/core/utils/src/typedi/interfaces/handler.interface.ts new file mode 100644 index 000000000..8aa14cefa --- /dev/null +++ b/packages/core/utils/src/typedi/interfaces/handler.interface.ts @@ -0,0 +1,31 @@ +import { ContainerInstance } from '../container-instance.class'; +import { Constructable } from '../types/constructable.type'; + +/** + * Used to register special "handler" which will be executed on a service class during its initialization. + * It can be used to create custom decorators and set/replace service class properties and constructor parameters. + */ +export interface Handler { + /** + * Service object used to apply handler to. + */ + object: Constructable; + + /** + * Class property name to set/replace value of. + * Used if handler is applied on a class property. + */ + propertyName?: string; + + /** + * Parameter index to set/replace value of. + * Used if handler is applied on a constructor parameter. + */ + index?: number; + + /** + * Factory function that produces value that will be set to class property or constructor parameter. + * Accepts container instance which requested the value. + */ + value: (container: ContainerInstance) => any; +} diff --git a/packages/core/utils/src/typedi/interfaces/service-metadata.interface.ts b/packages/core/utils/src/typedi/interfaces/service-metadata.interface.ts new file mode 100644 index 000000000..fa0626634 --- /dev/null +++ b/packages/core/utils/src/typedi/interfaces/service-metadata.interface.ts @@ -0,0 +1,61 @@ +import { ContainerInstance } from '../container-instance.class'; +import { Constructable } from '../types/constructable.type'; +import { ContainerIdentifier } from '../types/container-identifier.type'; +import { ContainerScope } from '../types/container-scope.type'; +import { ServiceIdentifier } from '../types/service-identifier.type'; + +/** + * Service metadata is used to initialize service and store its state. + */ +export interface ServiceMetadata { + /** Unique identifier of the referenced service. */ + id: ServiceIdentifier; + + /** + * The injection scope for the service. + * - a `singleton` service always will be created in the default container regardless of who registering it + * - a `container` scoped service will be created once when requested from the given container + * - a `transient` service will be created each time it is requested + */ + scope: ContainerScope; + + /** + * Class definition of the service what is used to initialize given service. + * This property maybe null if the value of the service is set manually. + * If id is not set then it serves as service id. + */ + type: Constructable | null; + + /** + * Factory function used to initialize this service. + * Can be regular function ("createCar" for example), + * or other service which produces this instance ([CarFactory, "createCar"] for example). + */ + factory: [Constructable, string] | CallableFunction | undefined; + + /** + * Instance of the target class. + */ + value: unknown | Symbol; + + /** + * Allows to setup multiple instances the different classes under a single service id string or token. + */ + multiple: boolean; + + /** + * Indicates whether a new instance should be created as soon as the class is registered. + * By default the registered classes are only instantiated when they are requested from the container. + * + * _Note: This option is ignored for transient services._ + */ + eager: boolean; + + /** + * Map of containers referencing this metadata. This is used when a container + * is inheriting it's parents definitions and values to track the lifecycle of + * the metadata. Namely, a service can be disposed only if it's only referenced + * by the container being disposed. + */ + referencedBy: Map; +} diff --git a/packages/core/utils/src/typedi/interfaces/service-options.interface.ts b/packages/core/utils/src/typedi/interfaces/service-options.interface.ts new file mode 100644 index 000000000..ffd8c756d --- /dev/null +++ b/packages/core/utils/src/typedi/interfaces/service-options.interface.ts @@ -0,0 +1,10 @@ +import { ServiceMetadata } from './service-metadata.interface'; + +/** + * The public ServiceOptions is partial object of ServiceMetadata and either one + * of the following is set: `type`, `factory`, `value` but not more than one. + */ +export type ServiceOptions = + | Omit>, 'referencedBy' | 'type' | 'factory'> + | Omit>, 'referencedBy' | 'value' | 'factory'> + | Omit>, 'referencedBy' | 'value' | 'type'>; diff --git a/packages/core/utils/src/typedi/token.class.ts b/packages/core/utils/src/typedi/token.class.ts new file mode 100644 index 000000000..e04e2899b --- /dev/null +++ b/packages/core/utils/src/typedi/token.class.ts @@ -0,0 +1,11 @@ +/** + * Used to create unique typed service identifier. + * Useful when service has only interface, but don't have a class. + */ +/* eslint-disable-next-line @typescript-eslint/no-unused-vars */ +export class Token { + /** + * @param name Token name, optional and only used for debugging purposes. + */ + constructor(public name?: string) {} +} diff --git a/packages/core/utils/src/typedi/types/abstract-constructable.type.ts b/packages/core/utils/src/typedi/types/abstract-constructable.type.ts new file mode 100644 index 000000000..df3fd89c5 --- /dev/null +++ b/packages/core/utils/src/typedi/types/abstract-constructable.type.ts @@ -0,0 +1,7 @@ +/** + * Generic type for abstract class definitions. + * + * Explanation: This describes a newable Function with a prototype Which is + * what an abstract class is - no constructor, just the prototype. + */ +export type AbstractConstructable = NewableFunction & { prototype: T }; diff --git a/packages/core/utils/src/typedi/types/constructable.type.ts b/packages/core/utils/src/typedi/types/constructable.type.ts new file mode 100644 index 000000000..706ce86cb --- /dev/null +++ b/packages/core/utils/src/typedi/types/constructable.type.ts @@ -0,0 +1,10 @@ +/** + * Generic type for class definitions. + * Example usage: + * ``` + * function createSomeInstance(myClassDefinition: Constructable) { + * return new myClassDefinition() + * } + * ``` + */ +export type Constructable = new (...args: any[]) => T; diff --git a/packages/core/utils/src/typedi/types/container-identifier.type.ts b/packages/core/utils/src/typedi/types/container-identifier.type.ts new file mode 100644 index 000000000..205c6bf27 --- /dev/null +++ b/packages/core/utils/src/typedi/types/container-identifier.type.ts @@ -0,0 +1,4 @@ +/** + * A container identifier. This value must be unique across all containers. + */ +export type ContainerIdentifier = string | Symbol; diff --git a/packages/core/utils/src/typedi/types/container-scope.type.ts b/packages/core/utils/src/typedi/types/container-scope.type.ts new file mode 100644 index 000000000..0860b0716 --- /dev/null +++ b/packages/core/utils/src/typedi/types/container-scope.type.ts @@ -0,0 +1 @@ +export type ContainerScope = 'singleton' | 'container' | 'transient'; diff --git a/packages/core/utils/src/typedi/types/service-identifier.type.ts b/packages/core/utils/src/typedi/types/service-identifier.type.ts new file mode 100644 index 000000000..f0f886a82 --- /dev/null +++ b/packages/core/utils/src/typedi/types/service-identifier.type.ts @@ -0,0 +1,14 @@ +import { Token } from '../token.class'; +import { Constructable } from './constructable.type'; +import { AbstractConstructable } from './abstract-constructable.type'; + +/** + * Unique service identifier. + * Can be some class type, or string id, or instance of Token. + */ +export type ServiceIdentifier = + | Constructable + | AbstractConstructable + | CallableFunction + | Token + | string; diff --git a/packages/core/utils/src/typedi/utils/resolve-to-type-wrapper.util.ts b/packages/core/utils/src/typedi/utils/resolve-to-type-wrapper.util.ts new file mode 100644 index 000000000..2506b56d8 --- /dev/null +++ b/packages/core/utils/src/typedi/utils/resolve-to-type-wrapper.util.ts @@ -0,0 +1,43 @@ +import { Token } from '../token.class'; +import { Constructable } from '../types/constructable.type'; +import { ServiceIdentifier } from '../types/service-identifier.type'; + +/** + * Helper function used in inject decorators to resolve the received identifier to + * an eager type when possible or to a lazy type when cyclic dependencies are possibly involved. + * + * @param typeOrIdentifier a service identifier or a function returning a type acting as service identifier or nothing + * @param target the class definition of the target of the decorator + * @param propertyName the name of the property in case of a PropertyDecorator + * @param index the index of the parameter in the constructor in case of ParameterDecorator + */ +export function resolveToTypeWrapper( + typeOrIdentifier: ((type?: never) => Constructable) | ServiceIdentifier | undefined, + target: Object, + propertyName: string | Symbol, + index?: number, +): { eagerType: ServiceIdentifier | null; lazyType: (type?: never) => ServiceIdentifier } { + /** + * ? We want to error out as soon as possible when looking up services to inject, however + * ? we cannot determine the type at decorator execution when cyclic dependencies are involved + * ? because calling the received `() => MyType` function right away would cause a JS error: + * ? "Cannot access 'MyType' before initialization", so we need to execute the function in the handler, + * ? when the classes are already created. To overcome this, we use a wrapper: + * ? - the lazyType is executed in the handler so we never have a JS error + * ? - the eagerType is checked when decorator is running and an error is raised if an unknown type is encountered + */ + let typeWrapper!: { eagerType: ServiceIdentifier | null; lazyType: (type?: never) => ServiceIdentifier }; + + /** If requested type is explicitly set via a string ID or token, we set it explicitly. */ + if ((typeOrIdentifier && typeof typeOrIdentifier === 'string') || typeOrIdentifier instanceof Token) { + typeWrapper = { eagerType: typeOrIdentifier, lazyType: () => typeOrIdentifier }; + } + + /** If requested type is explicitly set via a () => MyClassType format, we set it explicitly. */ + if (typeOrIdentifier && typeof typeOrIdentifier === 'function') { + /** We set eagerType to null, preventing the raising of the CannotInjectValueError in decorators. */ + typeWrapper = { eagerType: null, lazyType: () => (typeOrIdentifier as CallableFunction)() }; + } + + return typeWrapper; +} diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/transformers.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/transformers.tsx similarity index 60% rename from packages/plugins/@nocobase/plugin-data-visualization/src/client/block/transformers.ts rename to packages/plugins/@nocobase/plugin-data-visualization/src/client/block/transformers.tsx index 2668f23c7..e6f44397e 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/transformers.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/block/transformers.tsx @@ -1,10 +1,16 @@ +import React from 'react'; +import { Popover, Space, Tag } from 'antd'; import dayjs from 'dayjs'; -export type Transformer = (val: any, locale?: string) => string | number; +export type Transformer = (val: any, locale?: string) => string | number | React.JSX.Element; const transformers: { [key: string]: { - [key: string]: Transformer; + [key: string]: + | Transformer + | { + [key: string]: Transformer; + }; }; } = { datetime: { @@ -48,6 +54,42 @@ const transformers: { }, Exponential: (val: number | string) => (+val)?.toExponential(), Abbreviation: (val: number, locale = 'en-US') => new Intl.NumberFormat(locale, { notation: 'compact' }).format(val), + Decimal: { + TwoDigits: (val: number) => + new Intl.NumberFormat('en-US', { style: 'decimal', minimumFractionDigits: 2, maximumFractionDigits: 2 }).format( + val, + ), + ThreeDigits: (val: number) => + new Intl.NumberFormat('en-US', { style: 'decimal', minimumFractionDigits: 3, maximumFractionDigits: 3 }).format( + val, + ), + FourDigits: (val: number) => + new Intl.NumberFormat('en-US', { style: 'decimal', minimumFractionDigits: 4, maximumFractionDigits: 4 }).format( + val, + ), + }, + }, + array: { + title: (items: string[]) => { + return ( + + {items.map((item) => ( + {item} + ))} + + } + > + + {items.slice(0, 2).map((item) => ( + {item} + ))} + + {items.length > 2 ? '...' : ''} + + ); + }, }, }; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/GroupedTable.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/GroupedTable.ts new file mode 100644 index 000000000..b4127a20d --- /dev/null +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/GroupedTable.ts @@ -0,0 +1,115 @@ +import { uid } from '@nocobase/utils/client'; +import { RenderProps } from '../chart'; +import { AntdChart } from './antd'; +import { Table as AntdTable } from 'antd'; + +export class GroupedTable extends AntdChart { + constructor() { + super({ name: 'groupedTable', title: 'GroupedTable', component: AntdTable }); + } + + getProps({ data, fieldProps, general, advanced, ctx }: RenderProps) { + const { transform } = ctx; + const columns = data.length + ? Object.keys(data[0]).map((item) => ({ + title: fieldProps[item]?.label || item, + dataIndex: item, + key: item, + calculate: true, + })) + : []; + const dataSource = []; + let key = 0; + data.forEach((item: any, index) => { + Object.keys(item).forEach((key: string) => { + const props = fieldProps[key]; + if (props?.interface === 'percent') { + const value = Math.round(parseFloat(item[key]) * 100).toFixed(2); + item[key] = `${value}%`; + } + if (typeof item[key] === 'boolean') { + item[key] = item[key].toString(); + } + if (props?.transformer) { + item[key] = props.transformer(item[key]); + } + }); + const dataValue = dataSource.filter((value) => value['product.name'] == item['product.name'])[0]; + if (dataValue) { + dataSource[dataValue.key].children.push({ + key: `key${uid()}${uid()}`, + ...item, + }); + } else { + dataSource.push({ + key: key, + ...item, + children: [ + { + key: `key${uid()}`, + ...item, + }, + ], + }); + key++; + } + }); + advanced?.columns?.forEach((dataValue) => { + dataSource.forEach((value) => { + if (dataValue.calculate) { + let number: any = transform.filter((value) => value.field == dataValue.key)[0]; + if (number) { + number = number.specific ? number.specific : 3; + switch (number) { + case 'TwoDigits': + number = 2; + break; + case 'ThreeDigits': + number = 3; + break; + case 'FourDigits': + number = 4; + break; + } + } else { + number = 3; + } + const options = { + style: 'decimal', + minimumFractionDigits: number, + maximumFractionDigits: number, + }; + const numberFormat = new Intl.NumberFormat('zh-CN', options); + const num = String(value[dataValue.key]).includes(',') + ? String(value[dataValue.key]).replace(/,/g, '') + : value[dataValue.key]; + if (!isNaN(num)) { + const sum = value.children.reduce((sum, curr) => { + const sub = String(curr[dataValue.key]).includes(',') + ? String(curr[dataValue.key]).replace(/,/g, '') + : curr[dataValue.key]; + return sum + parseFloat(sub); + }, 0); + value[dataValue.key] = numberFormat.format(sum); + } + } else { + value[dataValue.key] = ''; + } + }); + }); + return { + bordered: true, + size: 'middle', + pagination: false, + dataSource, + columns, + scroll: { + x: 'max-content', + }, + rowKey: (record) => record.key, + ...general, + ...advanced, + expandRowByClick: true, + }; + } +} diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/index.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/index.ts index 9c75ae6e6..93e8d6b94 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/index.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/antd/index.ts @@ -1,4 +1,5 @@ import { Statistic } from './statistic'; import { Table } from './table'; +import { GroupedTable } from './GroupedTable'; -export default [new Statistic(), new Table()]; +export default [new Statistic(), new Table(), new GroupedTable()]; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/chart.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/chart.ts index ddccbab7f..c7ae80215 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/chart.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/chart.ts @@ -1,22 +1,23 @@ -import React from 'react'; +import React, { useContext } from 'react'; import { FieldOption } from '../hooks'; -import { QueryProps } from '../renderer'; +import { ChartRendererContext, QueryProps } from '../renderer'; import { parseField } from '../utils'; import { ISchema } from '@formily/react'; import configs, { AnySchemaProperties, Config } from './configs'; import { Transformer } from '../block/transformers'; export type RenderProps = { - data: Record[]; + data: any; general: any; advanced: any; fieldProps: { [field: string]: { label: string; transformer: Transformer; - interface: string; + interface: any; }; }; + ctx: any; }; export interface ChartType { @@ -168,10 +169,10 @@ export class Chart implements ChartType { return props; } - render({ data, general, advanced, fieldProps }: RenderProps) { + render({ data, general, advanced, fieldProps, ctx }: RenderProps) { return () => React.createElement(this.component, { - ...this.getProps({ data, general, advanced, fieldProps }), + ...this.getProps({ data, general, advanced, fieldProps, ctx }), }); } } diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/dualAxes.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/dualAxes.ts index 437c2d18c..ca63adf8c 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/dualAxes.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/chart/g2plot/dualAxes.ts @@ -1,7 +1,8 @@ import { G2PlotChart } from './g2plot'; import { ChartType, RenderProps } from '../chart'; -import React from 'react'; +import React, { useContext } from 'react'; import { DualAxes as G2DualAxes } from '@ant-design/plots'; +import { ChartRendererContext } from '../../renderer'; export class DualAxes extends G2PlotChart { constructor() { @@ -64,8 +65,8 @@ export class DualAxes extends G2PlotChart { }; }; - render({ data, general, advanced, fieldProps }: RenderProps) { - const props = this.getProps({ data, general, advanced, fieldProps }); + render({ data, general, advanced, fieldProps, ctx }: RenderProps) { + const props = this.getProps({ data, general, advanced, fieldProps, ctx }); const { data: _data } = props; return () => React.createElement(this.component, { diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx index ef5d620e4..145718ca4 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/ChartConfigure.tsx @@ -24,6 +24,7 @@ import { useOrderFieldsOptions, useOrderReaction, useTransformers, + useTransformersDecimal, } from '../hooks'; import { useChartsTranslation } from '../locale'; import { ChartRenderer, ChartRendererContext } from '../renderer'; @@ -401,7 +402,7 @@ ChartConfigure.Transform = function Transform() { ); }; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/schemas/configure.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/schemas/configure.ts index 523a241d2..edbdda96b 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/schemas/configure.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/configure/schemas/configure.ts @@ -211,6 +211,7 @@ export const querySchema: ISchema = { { label: '{{t("Avg")}}', value: 'avg' }, { label: '{{t("Max")}}', value: 'max' }, { label: '{{t("Min")}}', value: 'min' }, + { label: 'array_agg', value: 'array_agg' }, ], }, alias: { @@ -490,6 +491,16 @@ export const transformSchema: ISchema = { 'x-reactions': '{{ useTransformers }}', 'x-visible': '{{ $self.dataSource && $self.dataSource.length }}', }, + specific: { + type: 'string', + 'x-decorator': 'FormItem', + 'x-component': 'Select', + 'x-component-props': { + placeholder: '{{t("Format")}}', + }, + 'x-reactions': '{{ useTransformersDecimal }}', + 'x-visible': '{{ $self.dataSource && $self.dataSource.length }}', + }, }, { 'x-decorator-props': { diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/filter.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/filter.ts index fc0b8993f..a805b8127 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/filter.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/filter.ts @@ -309,9 +309,9 @@ export const useChartFilter = () => { .filter((chart) => hasFilter(chart, filterValues)) .map((chart) => async () => { const { service, collection } = chart; - await service.runAsync(collection, appendFilter(chart, filterValues), true); + return await service.runAsync(collection, appendFilter(chart, filterValues), true); }); - await Promise.all(requests.map((request) => request())); + return await Promise.all(requests.map((request) => request())); }; const refresh = async () => { diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/transformer.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/transformer.ts index 4a1c9a2ce..f1db98777 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/transformer.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/hooks/transformer.ts @@ -38,7 +38,6 @@ export const useFieldTypes = (fields: FieldOption[]) => (field: any) => { return; } field.setState({ - value: null, disabled: false, }); }; @@ -56,11 +55,39 @@ export const useTransformers = (field: any) => { field.dataSource = options; }; +//添加小数判断方法 +export const useTransformersDecimal = (field: any) => { + const selectedType = field.query('.type').get('value'); + const selectedFormat = field.query('.format').get('value'); + if (!selectedFormat || !selectedType || selectedFormat != 'Decimal') { + field.dataSource = []; + } else { + const options = Object.keys(transformers[selectedType][selectedFormat] || {}).map((key) => ({ + label: lang(key), + value: key, + })); + field.dataSource = options; + } +}; + export const useFieldTransformer = (transform: ChartRendererProps['transform'], locale = 'en-US') => { return (transform || []) - .filter((item) => item.field && item.type && item.format) + .filter((item) => { + if (item.format) { + //对小数做了判断 + if (item.format == 'Decimal') { + if (item.specific) { + return item.field && item.type && item.format && item.specific; + } + } else { + return item.field && item.type && item.format; + } + } + }) .reduce((mp, item) => { - const transformer = transformers[item.type][item.format]; + const transformer = item.specific + ? transformers[item.type][item.format][item.specific] + : transformers[item.type][item.format]; if (!transformer) { return mp; } diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx index 793222d4a..c04605c0d 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx @@ -34,5 +34,6 @@ export default DataVisualizationPlugin; export { Chart } from './chart/chart'; export type { ChartProps, ChartType, RenderProps } from './chart/chart'; export type { FieldOption } from './hooks'; +export { useChartFilter } from './hooks'; export type { QueryProps } from './renderer'; export { ChartConfigContext } from './configure'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx index c45325e6f..0f27fd0a8 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRenderer.tsx @@ -49,6 +49,7 @@ export const ChartRenderer: React.FC & { } return props; }, {}), + ctx, }); const C = () => diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx index 9448b187a..08d4aa1bb 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/renderer/ChartRendererProvider.tsx @@ -29,6 +29,7 @@ export type TransformProps = { field: string; type: string; format: string; + specific?: string; }; export type QueryProps = Partial<{ diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/en-US.json index f066a6f6d..9e64998c8 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/locale/en-US.json +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/en-US.json @@ -80,5 +80,9 @@ "Time range": "Time range", "Edit field properties": "Edit field properties", "Select a source field to use metadata of the field": "Select a source field to use metadata of the field", - "Original field": "Original field" + "Original field": "Original field", + "Decimal":"Decimal", + "TwoDigits":"TwoDigits", + "ThreeDigits":"ThreeDigits", + "FourDigits":"FourDigits" } diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/zh-CN.json index 81f733a24..6df025e87 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/locale/zh-CN.json +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/locale/zh-CN.json @@ -81,5 +81,9 @@ "Time range": "时间范围", "Edit field properties": "编辑字段属性", "Select a source field to use metadata of the field": "选择来源字段可以复用字段的元数据配置", - "Original field": "原始字段" + "Original field": "原始字段", + "Decimal":"小数", + "TwoDigits":"保留两位", + "ThreeDigits":"保留三位", + "FourDigits":"保留四位" } diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts index 42f229128..3ea490fed 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/server/actions/query.ts @@ -301,6 +301,10 @@ export const cacheMiddleware = async (ctx: Context, next: Next) => { }; const checkPermission = (ctx: Context, next: Next) => { + // fix params not in the body + if (ctx.action.params.values === undefined) { + ctx.action.params.values = ctx.action.params; + } const { collection } = ctx.action.params.values as QueryParams; const roleName = ctx.state.currentRole || 'anonymous'; const can = ctx.app.acl.can({ role: roleName, resource: collection, action: 'list' }); diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx index c9be2c2c4..ac2f9d9ef 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/interfaces/formula.tsx @@ -96,6 +96,12 @@ export class FormulaFieldInterface extends CollectionFieldInterface { required: true, default: 'double', }, + 'uiSchema.x-component-props.addonAfter': { + type: 'string', + title: '后缀', + 'x-decorator': 'FormItem', + 'x-component': 'Input', + }, // 'uiSchema.x-component-props.showUnchecked': { // type: 'boolean', // title: '{{t("Display X when unchecked")}}', @@ -195,7 +201,7 @@ export class FormulaFieldInterface extends CollectionFieldInterface { }, }; filterable = { - operators: operators.number, + operators: operators.string, }; titleUsable = true; } diff --git a/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts b/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts index 4a258e71f..00ec5b62e 100644 --- a/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts +++ b/packages/plugins/@nocobase/plugin-import/src/server/actions/importXlsx.ts @@ -129,7 +129,9 @@ class Importer { }); result[0].push(instance); } catch (error) { - this.context.log.error(error, row); + if (error.message !== 'current transaction is aborted, commands ignored until end of transaction block') { + this.context.log.error(error, row); + } row.push(error.message); result[1].push(row); } diff --git a/packages/plugins/@nocobase/plugin-workflow/package.json b/packages/plugins/@nocobase/plugin-workflow/package.json index 2dcbf3d1f..9e00580f4 100644 --- a/packages/plugins/@nocobase/plugin-workflow/package.json +++ b/packages/plugins/@nocobase/plugin-workflow/package.json @@ -19,7 +19,7 @@ "@formily/react": "2.x", "@types/ejs": "^3.1.1", "antd": "5.x", - "axios": "^0.26.1", + "axios": "^1.6.2", "classnames": "^2.3.1", "cron-parser": "4.4.0", "dayjs": "^1.11.8", diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx index 31494a473..745832a52 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx @@ -56,6 +56,23 @@ export default class extends Instruction { ], required: true, }, + // 加一个单选框,根据选择的引擎,显示这个单选框 + transString: { + type: 'boolean', + 'x-decorator': 'FormItem', + 'x-component': 'Checkbox', + 'x-content': `解析字符串公式`, + 'x-reactions': [ + { + dependencies: ['engine'], + fulfill: { + state: { + visible: '{{$deps[0] == `formula.js`}}', + }, + }, + }, + ], + }, }; scope = { renderEngineReference, diff --git a/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/CalculationInstruction.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/CalculationInstruction.ts index b790c5fb7..ee875a890 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/CalculationInstruction.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/CalculationInstruction.ts @@ -4,6 +4,7 @@ import { Instruction } from '.'; import type Processor from '../Processor'; import { JOB_STATUS } from '../constants'; import type { FlowNodeModel } from '../types'; +import { cloneDeep, get } from 'lodash'; export interface CalculationConfig { engine?: string; @@ -12,13 +13,20 @@ export interface CalculationConfig { export class CalculationInstruction extends Instruction { async run(node: FlowNodeModel, prevJob, processor: Processor) { - const { engine = 'math.js', expression = '' } = node.config; + const { engine = 'math.js', expression = '', transString = false } = node.config; const scope = processor.getScope(node.id); - const evaluator = evaluators.get(engine); try { - const result = evaluator && expression ? evaluator(expression, scope) : null; + let result = evaluator && expression ? evaluator(expression, scope) : null; + if (transString && engine === 'formula.js') { + const context = cloneDeep(scope); + const targetVal = expression.trim().replace(/{{\s*([\w$.-]+)\s*}}/g, (_, v) => { + const item = get(context, v) ?? null; + return item; + }); + result = evaluators.get(engine)(targetVal); + } return { result, status: JOB_STATUS.RESOLVED,