@ronin/syntax
Advanced tools
Comparing version 0.2.23 to 0.2.24
@@ -424,3 +424,13 @@ import { P as PublicModel, M as ModelIndex, a as ModelField, b as ModelTrigger, c as ModelPreset, S as StoredObject, d as SyntaxItem, Q as QUERY_SYMBOLS } from './index-PU-o0t1n.js'; | ||
declare const concat: (...values: Array<string | unknown | Record<typeof QUERY_SYMBOLS.EXPRESSION, string>>) => string; | ||
/** | ||
* Replaces all occurrences of a substring within a string with a replacement value. | ||
* | ||
* @param input - The string to perform replacements on. | ||
* @param search - The substring to search for. | ||
* @param replacement - The string to replace matches with. | ||
* | ||
* @returns SQL expression that evaluates to the modified string. | ||
*/ | ||
declare const replace: (input: string, search: string, replacement: string) => string; | ||
export { type Chain, type FieldOutput, type Model, type ModelFieldExpressions, type SyntaxField, abs, blob, boolean, concat, date, json, json_insert, json_patch, json_replace, json_set, link, model, number, op, random, sql, strftime, string }; | ||
export { type Chain, type FieldOutput, type Model, type ModelFieldExpressions, type SyntaxField, abs, blob, boolean, concat, date, json, json_insert, json_patch, json_replace, json_set, link, model, number, op, random, replace, sql, strftime, string }; |
@@ -88,2 +88,7 @@ import { | ||
}; | ||
var replace = (input, search, replacement) => { | ||
return expression( | ||
`replace('${input}', '${search}', '${replacement}')` | ||
); | ||
}; | ||
export { | ||
@@ -105,2 +110,3 @@ abs, | ||
random, | ||
replace, | ||
sql, | ||
@@ -107,0 +113,0 @@ strftime, |
{ | ||
"name": "@ronin/syntax", | ||
"version": "0.2.23", | ||
"version": "0.2.24", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Allows for defining RONIN queries and schemas in code.", |
67697
1598