@ronin/compiler
Advanced tools
Comparing version 0.5.1 to 0.5.2-leo-ron-1083-1-experimental.0
@@ -506,3 +506,4 @@ // src/utils/helpers.ts | ||
{ slug: "unique", type: "boolean" }, | ||
{ slug: "filter", type: "json" } | ||
{ slug: "filter", type: "json" }, | ||
{ slug: "fields", type: "json", required: true } | ||
] | ||
@@ -701,6 +702,18 @@ }, | ||
const filterQuery = instructionList?.filter; | ||
const fields = instructionList?.fields; | ||
const params = []; | ||
let statement2 = `${tableAction}${unique ? " UNIQUE" : ""} INDEX "${indexName}"`; | ||
if (queryType === "create") { | ||
statement2 += ` ON "${tableName}"`; | ||
const columns = fields.map((field) => { | ||
let fieldSelector = ""; | ||
if ("slug" in field) { | ||
({ fieldSelector } = getFieldFromSchema( | ||
targetSchema, | ||
field.slug, | ||
"to" | ||
)); | ||
} | ||
return fieldSelector; | ||
}); | ||
statement2 += ` ON "${tableName}" (${columns.join(", ")})`; | ||
if (filterQuery) { | ||
@@ -707,0 +720,0 @@ const withStatement = handleWith( |
{ | ||
"name": "@ronin/compiler", | ||
"version": "0.5.1", | ||
"version": "0.5.2-leo-ron-1083-1-experimental.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Compiles RONIN queries to SQL statements.", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
372727
6118
1