Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

verse.db

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verse.db - npm Package Compare versions

Comparing version 2.2.14 to 2.2.15

4

dist/adapters/json.adapter.d.ts
import { EventEmitter } from "events";
import { AdapterResults, AdapterUniqueKey, JsonYamlAdapter, CollectionFilter, queryOptions, operationKeys } from "../types/adapter";
import { AdapterResults, AdapterUniqueKey, JsonYamlAdapter, CollectionFilter, queryOptions, operationKeys, AggregateStage } from "../types/adapter";
import { DevLogsOptions, AdapterSetting } from "../types/adapter";

@@ -60,3 +60,3 @@ import { nearbyOptions, SecureSystem } from "../types/connect";

}>): Promise<AdapterResults>;
aggregate(dataname: string, pipeline: any[]): Promise<AdapterResults>;
aggregate(dataname: string, pipeline: AggregateStage[]): Promise<AdapterResults>;
moveData(from: string, to: string, options: {

@@ -63,0 +63,0 @@ query?: queryOptions;

@@ -53,3 +53,3 @@ import { EventEmitter } from "events";

* @param {string} sessionId - The session ID
* @returns {Promise<AdapterResults>} - A Promise that resolves when the session is droped
* @returns {Promise<AdapterResults>} - A Promise that resolves when the session is dropped
*/

@@ -56,0 +56,0 @@ drop(sessionId: string): Promise<AdapterResults>;

@@ -189,3 +189,3 @@ "use strict";

* @param {string} sessionId - The session ID
* @returns {Promise<AdapterResults>} - A Promise that resolves when the session is droped
* @returns {Promise<AdapterResults>} - A Promise that resolves when the session is dropped
*/

@@ -199,3 +199,3 @@ async drop(sessionId) {

(0, logger_1.logSuccess)({
content: `Session ${sessionId} droped`,
content: `Session ${sessionId} dropped`,
devLogs: this.devLogs,

@@ -205,3 +205,3 @@ });

acknowledged: true,
message: `Session ${sessionId} droped`,
message: `Session ${sessionId} dropped`,
};

@@ -208,0 +208,0 @@ }

import { EventEmitter } from "events";
import { AdapterResults, MigrationPath, SQLAdapter, TableOptions, operationKeys } from "../types/adapter";
import { AdapterResults, AggregateStage, MigrationPath, SQLAdapter, TableOptions, operationKeys } from "../types/adapter";
import { DevLogsOptions, AdapterSetting } from "../types/adapter";

@@ -74,3 +74,3 @@ import { JoinSQL, SecureSystem } from "../types/connect";

}>): Promise<AdapterResults>;
aggregateData(dataname: string, schema: SQLSchema, pipeline: any[]): Promise<AdapterResults>;
aggregateData(dataname: string, schema: SQLSchema, pipeline: AggregateStage[]): Promise<AdapterResults>;
toJSON(filePath: string, schema: SQLSchema, tableName?: string): Promise<AdapterResults>;

@@ -77,0 +77,0 @@ migrateData({ from, to }: MigrationPath, { fromTable, toTable, query }: TableOptions): Promise<AdapterResults>;

import { EventEmitter } from "events";
import { AdapterResults, AdapterUniqueKey, CollectionFilter, queryOptions, JsonYamlAdapter } from "../types/adapter";
import { AdapterResults, AdapterUniqueKey, CollectionFilter, queryOptions, JsonYamlAdapter, AggregateStage } from "../types/adapter";
import { DevLogsOptions, AdapterSetting } from "../types/adapter";

@@ -56,3 +56,3 @@ import { nearbyOptions, SecureSystem } from "../types/connect";

}>): Promise<AdapterResults>;
aggregate(dataname: string, pipeline: any[]): Promise<AdapterResults>;
aggregate(dataname: string, pipeline: AggregateStage[]): Promise<AdapterResults>;
moveData(from: string, to: string, options: {

@@ -59,0 +59,0 @@ query?: queryOptions;

import { AdapterOptions, BackupOptions, SecureSystem, DevLogsOptions, CollectionFilter, operationKeys, QueryOptions, JoinSQL, StructureMethods, ModelMethods, ListCollectionOptions } from "../types/connect";
import { AdapterResults, MigrationPath, nearbyOptions, TableOptions } from "../types/adapter";
import { AdapterResults, MigrationPath, nearbyOptions, TableOptions, AggregateStage } from "../types/adapter";
import Schema from "./functions/schema";

@@ -73,3 +73,3 @@ import { jsonAdapter, yamlAdapter, sqlAdapter, sessionAdapter, CacheAdapter } from "../adapters/export";

*/
aggregate(dataname: string, pipeline: any[]): Promise<AdapterResults | undefined>;
aggregate(dataname: string, pipeline: AggregateStage[]): Promise<AdapterResults | undefined>;
/**

@@ -242,3 +242,3 @@ *

schema: SQLSchema;
loadedData: any[];
loadedData?: any[];
}, update: {

@@ -302,3 +302,3 @@ updateQuery: operationKeys;

*/
aggregateData(dataname: string, schema: SQLSchema, pipeline: any[]): Promise<any>;
aggregateData(dataname: string, schema: SQLSchema, pipeline: AggregateStage[]): Promise<any>;
/**

@@ -305,0 +305,0 @@ * Counts the number of tables in the specified data file.

@@ -107,3 +107,2 @@ "use strict";

case 'ARRAY':
// Ensure it's a valid JSON string
try {

@@ -116,3 +115,2 @@ return JSON.parse(value.replace(/'/g, '"'));

case 'JSON':
// Handle nested JSON objects
try {

@@ -179,3 +177,4 @@ return JSON.parse(value.replace(/'/g, '"'));

if (typeof type === 'string') {
const normalizedType = sql_types_1.SQLTypes[type];
const sanitizedType = type.replace(/,/g, '').trim();
const normalizedType = sql_types_1.SQLTypes[sanitizedType];
if (!normalizedType) {

@@ -182,0 +181,0 @@ throw new Error(`Invalid SQL type: ${type}`);

@@ -192,4 +192,4 @@ import { FindQuery } from "./sql-types";

point: {
latitude: number;
longitude: number;
x: number;
y: number;
};

@@ -272,2 +272,38 @@ radius: number;

}
export interface AggregateStage {
$match?: Record<string, any>;
$unwind?: string;
$group?: {
_id: any;
[key: string]: {
$sum?: string;
$avg?: string;
$min?: string;
$max?: string;
$first?: string;
$last?: string;
$addToSet?: string;
$push?: string;
};
};
$addFields?: Record<string, any>;
$project?: Record<string, any>;
$facet?: Record<string, AggregateStage[]>;
$redact?: any;
$bucket?: {
groupBy: string;
boundaries: any[];
default?: any;
};
$lookup?: {
from: string;
localField: string;
foreignField: string;
as: string;
};
$sample?: number;
$sort?: Record<string, 1 | -1>;
$limit?: number;
$skip?: number;
}
//# sourceMappingURL=adapter.d.ts.map
import { FindQuery } from "./sql-types";
import { SQLSchema } from "../core/functions/SQL-Schemas";
import { MigrationPath, SessionData, TableOptions, AdapterResults } from "./adapter";
import { MigrationPath, SessionData, TableOptions, AdapterResults, AggregateStage } from "./adapter";
import { jsonAdapter } from "../adapters/json.adapter";

@@ -25,3 +25,3 @@ import { yamlAdapter } from "../adapters/yaml.adapter";

batchTasks(operation: any[]): Promise<any>;
aggregate(dataname: string, pipeline: any[]): Promise<any>;
aggregate(dataname: string, pipeline: AggregateStage[]): Promise<any>;
moveData(from: string, to: string, options: {

@@ -51,2 +51,3 @@ query?: any;

batchTasks(operation: any[]): Promise<any>;
aggregate(dataname: string, pipeline: AggregateStage[]): Promise<any>;
moveData(from: string, to: string, options: {

@@ -98,3 +99,3 @@ query?: any;

tableNames(filePath: string): Promise<void>;
aggregateData(dataname: string, schema: SQLSchema, pipeline: any[]): Promise<void>;
aggregateData(dataname: string, schema: SQLSchema, pipeline: AggregateStage[]): Promise<void>;
toJSON(filePath: string, schema: SQLSchema, tableName?: string): Promise<void>;

@@ -233,4 +234,4 @@ }

point: {
latitude: number;
longitude: number;
x: number;
y: number;
};

@@ -282,7 +283,11 @@ radius: number;

listCollection(options: ListCollectionOptions): Promise<AdapterResults>;
findCollection(check?: 'startsWith' | 'endsWith' | 'normal'): Promise<AdapterResults>;
findCollection(check?: 'startsWith' | 'endsWith' | 'normal', regexPattern?: RegExp): Promise<AdapterResults>;
updateCollection(newDataName: string): Promise<AdapterResults>;
dropCollection(): Promise<any>;
listContainers(options: ListCollectionOptions): Promise<AdapterResults>;
updateContainer(containerName: string, newContainerName: string): Promise<AdapterResults>;
findContainer(containerName: string, check?: "normal" | "startsWith" | "endsWith" | "regex", regexPattern?: RegExp): Promise<AdapterResults>;
dropContainer(containerName: string, options: ListCollectionOptions): Promise<AdapterResults>;
renameTable(oldTableName: string, newTableName: string): Promise<AdapterResults>;
insertData(data: any[]): Promise<AdapterResults>;
insertData(data: any): Promise<AdapterResults>;
selectData(params: {

@@ -321,3 +326,3 @@ query: any;

migrateData({ from, to }: MigrationPath, { fromTable, toTable, query }: TableOptions): Promise<AdapterResults>;
aggregateData(pipeline: any[]): Promise<AdapterResults>;
aggregateData(pipeline: AggregateStage[]): Promise<AdapterResults>;
dataSize(): Promise<any>;

@@ -330,2 +335,6 @@ watch(): Promise<any>;

updateCollection(newDataName: string): Promise<AdapterResults>;
listContainers(options: ListCollectionOptions): Promise<AdapterResults>;
updateContainer(containerName: string, newContainerName: string): Promise<AdapterResults>;
findContainer(containerName: string, check?: "normal" | "startsWith" | "endsWith" | "regex", regexPattern?: RegExp): Promise<AdapterResults>;
dropContainer(containerName: string, options: ListCollectionOptions): Promise<AdapterResults>;
add(newData: any, options?: any): Promise<any>;

@@ -332,0 +341,0 @@ remove(query: any, options: {

{
"name": "verse.db",
"version": "2.2.14",
"version": "2.2.15",
"description": "verse.db isn't just a database, it's your universal data bridge. Designed for unmatched flexibility, security, and performance, verse.db empowers you to manage your data with ease.",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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