Skip to content

Store and load information from rdflib.js formulae (stores/graphs) to indexedDB storage in the browser.

License

Notifications You must be signed in to change notification settings

rescribet/persisted_formula

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Persisted formula

Store and load information from rdflib.js formulae (stores/graphs) to indexedDB storage in the browser.

Usage

Persisting data:

import { persist } from 'persisted_formula'
const store = $rdf.graph()
// Write some data into the store
persist(store)
// The data is now stored in indexedDB

Loading data:

import { load } from 'persisted_formula'
const store = $rdf.Graph()
load(store)
// The data is now loaded into the store (if any data was present)

Accessing the raw API:

import PersistentQuadBackend from 'persisted_formula'

const toBeRemoved = [/* Some quads that need deletion */]
new PersistentQuadBackend()
  .connect()
  .then(backend => {
    toBeRemoved.forEach(q => backend.remove(q))
  })

About

Store and load information from rdflib.js formulae (stores/graphs) to indexedDB storage in the browser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published