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

@embracesql/client

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@embracesql/client - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

6

package.json
{
"name": "@embracesql/client",
"version": "0.1.0",
"version": "0.1.1",
"description": "Connects to EmbraceSQL over HTTP/S from browser and node.",

@@ -13,5 +13,5 @@ "type": "module",

"dependencies": {
"@embracesql/shared": "^0.1.0"
"@embracesql/shared": "^0.1.1"
},
"gitHead": "6f0191319a0be4f5ebddc92fe81fb0b729521e87"
"gitHead": "8ea204346f819dd1a7cae4e0380f211b89eee243"
}

@@ -49,3 +49,3 @@ import {

: `${node.index.table.type.typescriptNamespacedName}[] | undefined`;
const optionType = `${node.index.table.typescriptNamespacedName}.Options`;
const optionType = `${node.index.type.typescriptNamespacedName}.Options & ${node.index.table.typescriptNamespacedName}.Options`;
const parametersPick = node.index.type.attributes

@@ -173,2 +173,3 @@ .map(

const valuesType = `Partial<${node.table.type.typescriptNamespacedName}>`;
const optionType = `${node.table.typescriptNamespacedName}.Options`;
const returnType = `${node.table.type.typescriptNamespacedName}`;

@@ -182,6 +183,7 @@ const valuesPick = node.table.allColumns

return `
public async create(values: ${valuesType}) : Promise<${returnType}|undefined> {
const response = await this.client.invoke<never, ${valuesType}, ${returnType}, never>({
public async create(values: ${valuesType}, options?: ${optionType}) : Promise<${returnType}|undefined> {
const response = await this.client.invoke<never, ${valuesType}, ${returnType}, ${optionType}>({
operation: "${node.typescriptNamespacedPropertyName}",
values: {${valuesPick}}
values: {${valuesPick}},
options
});

@@ -219,2 +221,3 @@ return ${returnParsedRow(node.table)};

const parametersType = node.index.type.typescriptNamespacedName;
const optionType = `${node.index.table.typescriptNamespacedName}.Options`;
const valuesType = `Partial<${node.index.table.type.typescriptNamespacedName}>`;

@@ -238,7 +241,8 @@ const resultType = node.index.unique

`
public async ${node.typescriptPropertyName}(parameters: ${parametersType}, values: ${valuesType}) {
const response = await this.client.invoke<${parametersType}, ${valuesType}, ${resultType}, never>({
public async ${node.typescriptPropertyName}(parameters: ${parametersType}, values: ${valuesType}, options?: ${optionType}) {
const response = await this.client.invoke<${parametersType}, ${valuesType}, ${resultType}, ${optionType}>({
operation: "${node.typescriptNamespacedPropertyName}",
parameters: {${parametersPick}},
values: {${valuesPick}}
values: {${valuesPick}},
options
});

@@ -245,0 +249,0 @@ `,

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