New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ronin/syntax

Package Overview
Dependencies
Maintainers
0
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ronin/syntax - npm Package Compare versions

Comparing version 0.2.15 to 0.2.16-fix-default-value-type-experimental-112

dist/chunk-WTG3YDLI.js

2

dist/queries.d.ts

@@ -1,1 +0,1 @@

export { D as DeepCallable, P as PromiseTuple, R as ResultRecord, S as SyntaxItem, a as getBatchProxy, d as getBatchProxySQL, b as getProperty, g as getSyntaxProxy, c as getSyntaxProxySQL, s as setProperty } from './index-CjwNhaZy.js';
export { D as DeepCallable, P as PromiseTuple, R as ResultRecord, e as SyntaxItem, f as getBatchProxy, o as getBatchProxySQL, h as getProperty, g as getSyntaxProxy, k as getSyntaxProxySQL, i as setProperty } from './primitives-DntPMz1o.js';

@@ -8,3 +8,3 @@ import {

setProperty
} from "./chunk-F5WDF75U.js";
} from "./chunk-WTG3YDLI.js";
export {

@@ -11,0 +11,0 @@ getBatchProxy,

@@ -1,1 +0,96 @@

export { M as Model, e as SyntaxField, k as blob, i as boolean, h as date, j as json, l as link, m as model, n as number, f as string } from './index-CjwNhaZy.js';
import { Q as QUERY_SYMBOLS } from './primitives-DntPMz1o.js';
export { C as Chain, F as FieldOutput, M as Model, a as ModelFieldExpressions, S as SyntaxField, c as blob, b as boolean, d as date, j as json, l as link, m as model, n as number, s as string } from './primitives-DntPMz1o.js';
/** Valid operators for string concatenation */
type StringOperator = '||';
/** Valid arithmetic operators for numbers */
type NumberOperator = '+' | '-' | '*' | '/' | '%';
/** Valid comparison operators for numbers and strings */
type ComparisonOperator = '=' | '!=' | '>' | '<' | '>=' | '<=';
/**
* Creates a binary operation expression with type safety for operands.
*
* @param left - The left operand.
* @param operator - The operator to use (string concatenation or arithmetic).
* @param right - The right operand (must match type of left operand).
*
* @returns The formatted binary operation expression.
*/
declare const op: <T extends string | number | Record<typeof QUERY_SYMBOLS.EXPRESSION, string>>(left: T, operator: NumberOperator | ComparisonOperator | StringOperator, right: T) => T;
/**
* Wraps a raw SQL expression as-is.
* Use with caution as this bypasses SQL injection protection.
*
* @param expressions - The raw SQL expression to use.
*
* @returns The wrapped SQL expression
*/
declare const sql: (expressions: string) => any;
/**
* Generates a pseudo-random integer between -9223372036854775808 and +9223372036854775807.
*
* @returns SQL expression that evaluates to a random number.
*/
declare const random: () => number;
/**
* Calculates the absolute value of a number.
*
* @param value - The number to get absolute value of.
*
* @returns SQL expression that evaluates to the absolute value.
*/
declare const abs: (value: number | Record<string, string | number>) => number;
/**
* Formats a timestamp according to the specified format string.
*
* @param format - The format string (e.g. '%Y-%m-%d').
* @param timestamp - The timestamp to format, or 'now' for current time.
*
* @returns SQL expression that evaluates to the formatted timestamp.
*/
declare const strftime: (format: string, timestamp: string | "now") => Date;
/**
* Applies a JSON patch operation to a JSON document.
*
* @param patch - The JSON patch document defining the modifications.
* @param input - The JSON document to patch.
*
* @returns SQL expression that evaluates to the patched JSON document.
*/
declare const json_patch: (patch: string, input: string) => string;
/**
* Sets a value in a JSON document at the specified path.
* Creates the path if it doesn't exist and overwrites if it does.
*
* @param json - The JSON document to modify.
* @param path - The path to set the value at.
* @param value - The value to set.
*
* @returns SQL expression that evaluates to the modified JSON document.
*/
declare const json_set: (json: string, path: string, value: string) => string;
/**
* Replaces a value in a JSON document at the specified path.
* Only modifies existing paths, will not create new ones.
*
* @param json - The JSON document to modify.
* @param path - The path to replace the value at.
* @param value - The new value.
*
* @returns SQL expression that evaluates to the modified JSON document.
*/
declare const json_replace: (json: string, path: string, value: string) => string;
/**
* Inserts a value into a JSON document at the specified path.
* Only creates new paths, will not modify existing ones.
*
* @param json - The JSON document to modify.
* @param path - The path to insert the value at.
* @param value - The value to insert.
*
* @returns SQL expression that evaluates to the modified JSON document.
*/
declare const json_insert: (json: string, path: string, value: string) => string;
export { abs, json_insert, json_patch, json_replace, json_set, op, random, sql, strftime };
import {
abs,
blob,

@@ -6,8 +7,17 @@ boolean,

json,
json_insert,
json_patch,
json_replace,
json_set,
link,
model,
number,
op,
random,
sql,
strftime,
string
} from "./chunk-F5WDF75U.js";
} from "./chunk-WTG3YDLI.js";
export {
abs,
blob,

@@ -17,6 +27,14 @@ boolean,

json,
json_insert,
json_patch,
json_replace,
json_set,
link,
model,
number,
op,
random,
sql,
strftime,
string
};
{
"name": "@ronin/syntax",
"version": "0.2.15",
"version": "0.2.16-fix-default-value-type-experimental-112",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Allows for defining RONIN queries and schemas in code.",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc