# Full Documentation

# Methods

  • constructor
  • createCollection
  • deleteColection
  • getCollection

# Default

import QuipoDB from "quipodb";
const db = new QuipoDB(constructor);

# Constructor

Option Type Default Value
path String ./databases/index.sqlite
inMemory Boolean false
provider Class SQLite

# createCollection

Option Type Default Value
collectionName String index
primaryKey String NULL
cb Function (collection)=>{}
  • createDoc
  • deleteDoc
  • findDoc
  • hasDoc
  • updateDoc

# createDoc

Option Type Default Value
params document|document[] {}
cb Object[] (doc)=>{}

An key named ttl (Time-To-Live) will delete the document when the time is equal or greater than the current time.

# deleteDoc

Option Type Default Value
fn Function (doc)=>{}
cb Function ()=>{}

# findDoc

Option Type Default Value
fn Function (doc)=>{}
cb Function ()=>{}

# hasDoc

Option Type Default Value
fn Function (doc)=>{}
cb Function ()=>{}

# updateDoc

Option Type Default Value
params document {}
updateparams document {}
cb Object[] (this)=>{}

# deleteColection

Option Type Default Value
collectionName String index
cb Function ()=>{}

# getCollection

Option Type Default Value
fn Function (doc)=>{}
cb Function (document[])=>{}

# Plugins

This lies on the class QuipoDB itself

import QuipoDB from "quipodb";
import yourPlugin from "your-plugin-package"; // Or a class
const db = new QuipoDB();
const plugin = new yourPlugin();
db.registerPlugin(plugin);

Your plugin must expose these functions

  • createCollectionProvider
  • createColumnProvider
  • createDocProvider
  • deleteCollectionProvider
  • deleteDocProvider
  • updateDocProvider
  • getDocProvider
  • getAllCollectionsProvider
  • getAllFromCollectionProvider
  • hasDocProvider

# createCollectionProvider

Option Type
tableName String
primaryColumn string
dataType string

# createColumnProvider

Option Type
tableName String
columnName string
dataType string

# createDocProvider

Option Type
tableName String
data document
cb Function

# deleteCollectionProvider

Option Type
tableName String
cb Function

# deleteDocProvider

Option Type
tableName String
data document
cb Function

# getDocProvider

Option Type
tableName String
data document
cb Function

# getAllCollectionsProvider

Option Type
NULL NULL

# getAllFromCollectionProvider

Option Type
tableName String

# hasDocProvider

Option Type
tableName String
data document
cb Function

# updateDocProvider

Option Type
tableName String
primaryColumn String
data document
cb Function