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

react-sqlite-hook

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-sqlite-hook - npm Package Compare versions

Comparing version 0.0.1-alpha.2 to 0.0.1-beta.1

2

dist/package.json
{
"name": "react-sqlite-hook",
"version": "0.0.1-alpha.1",
"version": "0.0.1-alpha.2",
"description": "React Hook for @Capacitor-community/sqlite plugin",

@@ -5,0 +5,0 @@ "repository": {

import { AvailableResult } from './util/models';
interface SQLSet {
statement: string;
values: [any];
}
interface SQLiteResult extends AvailableResult {

@@ -26,3 +22,3 @@ openDB: (dbName: string, encrypted?: boolean, mode?: string) => Promise<{

}>;
executeSet: (set: [SQLSet]) => Promise<{
executeSet: (set: Array<any>) => Promise<{
changes?: {

@@ -29,0 +25,0 @@ changes: number;

@@ -90,4 +90,4 @@ //Inspired from https://github.com/capacitor-community/react-hooks/blob/master/src/storage/

/**
* Execute a set of Raw Statements as Array<SQLSet>
* @param set Array<SQLSet>
* Execute a set of Raw Statements as Array<any>
* @param set Array<any>
*/

@@ -94,0 +94,0 @@ const executeSet = useCallback(async (set) => {

{
"name": "react-sqlite-hook",
"version": "0.0.1-alpha.2",
"version": "0.0.1-beta.1",
"description": "React Hook for @Capacitor-community/sqlite plugin",

@@ -5,0 +5,0 @@ "repository": {

@@ -9,6 +9,3 @@ //Inspired from https://github.com/capacitor-community/react-hooks/blob/master/src/storage/

interface SQLSet {
statement: string;
values : [any];
}
interface SQLiteResult extends AvailableResult {

@@ -19,3 +16,3 @@ openDB: (dbName:string,encrypted?:boolean,mode?:string) => Promise<{result?: boolean, message?: string}>;

execute: (statements: string) => Promise<{changes?:{changes:number},message?:string}>;
executeSet: (set:[SQLSet]) => Promise<{changes?:{changes:number,lastId:number},message?:string}>;
executeSet: (set:Array<any>) => Promise<{changes?:{changes:number,lastId:number},message?:string}>;
run: (statement:string,values?:Array<any>) => Promise<{changes?:{changes:number,lastId:number},message?:string}>;

@@ -129,6 +126,6 @@ query: (statement:string,values?:Array<string>) => Promise<{values?:Array<any>,message?:string}>

/**
* Execute a set of Raw Statements as Array<SQLSet>
* @param set Array<SQLSet>
* Execute a set of Raw Statements as Array<any>
* @param set Array<any>
*/
const executeSet = useCallback(async (set:[SQLSet]) => {
const executeSet = useCallback(async (set:Array<any>) => {
if(set.length > 0) {

@@ -135,0 +132,0 @@ const r = await mSQLite.executeSet({set:set});

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