@arsonar/core

0.6.11 • Public • Published

@arsonar/core

A battery-including kappa database for hypercores.

Features

  • Create and clone collections
  • Add feeds to collections (using hypercores)
  • Add data types (models) to collections
  • Add data records to feeds
  • Replicate collections between peers
  • Blob store per collection
  • Full-text search
  • Pluggable query backends
  • Remote queries (into the peer to peer swarm)

Example

const { Workspace } = require('@arsonar/workspace')

const workspace = new Workspace('/tmp/database')
const collection = await workspace.get('my-db')

// Create a type.
await collection.putType({
  name: 'doc',
  fields: { title: { type: 'string' } }
})

// Put json records.
await collection.put({ type: 'doc', value: { title: 'Hello, world!' })

// Make a query.
const results = await collection.query('search', 'hello', { sync: true })
console.log(results)

Readme

Keywords

none

Package Sidebar

Install

npm i @arsonar/core

Weekly Downloads

0

Version

0.6.11

License

GPL-3.0

Unpacked Size

168 kB

Total Files

44

Last publish

Collaborators

  • frando