Giter Club home page Giter Club logo

cherry3-lite's Introduction


Cherry3 is a SQlite object modeling tool designed to work in an asynchronous environment.

Discord Buy Me A Coffee

Installation

Using npm:

$ npm install cherry3-lite

Using yarn:

$ yarn add cherry3-lite

Using pnpm:

$ pnpm add cherry3-lite

Features

  • Simple Setup: Get started quickly with minimal configuration.
  • SQlite Storage: Sqlite Will Come To Your Help Because It Is Compressed, Economical And Fast.
  • Asynchronous Operations: Perform Database Operations Asynchronously Using Promises.
  • Filter and Update: Easily filter and update records in your collections.

Usage

import db from 'cherry3-lite';
/* const db = require('cherry3-lite'); For CommonJS */

var data;

(async () => {

data = await db.set('test',5);
console.log(data); // => 5

data = await db.get('test');
console.log(data); // => 5

data = await db.delete('test');
console.log(data); // => true

data = await db.has('test');
console.log(data); // => false

data = await db.fetch('test');
console.log(data); // => null

data = await db.add('test',6);
console.log(data); // => 6

data = await db.sub('test',1);
console.log(data); // => 5

data = await db.inc('test',2);
console.log(data); // => 7

data = await db.dec('test',2);
console.log(data); // => 5

data = await db.all();
console.log(data);
/*
[{
id:2,
key:'test',
value:5
}]
*/

data = await db.fetchAll();
console.log(data);
/*
[{
id:2,
key:'test',
value:5
}]
*/

data = await db.type('test');
console.log(data); // => number

data = await db.push('testArray',1);
console.log(data); // => [1]

data = await db.push('testArray',[2,3,4,5]);
console.log(data); // => [1,2,3,4,5]

data = await db.pull('testArray',3);
console.log(data); // => [1,2,4,5]

data = await db.pull('testArray',[1,2,4]);
console.log(data); // => [5]

data = db.version;
console.log(data) // => 1.0.0



})();

Settings File Definitions

=> Click Here

Sqlite Viewer Extension

For Visual Studio Code

License

Cherry3 is licensed under the Apache License 2.0 License. See the LICENSE file for details.

Changelog

=> Click Here

Support

Discord Banner

cherry3-lite's People

Contributors

bes-js avatar

Stargazers

 avatar Pikushe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.