@arso-project/sonar-dat

The core. Manages islands, where each island is a kappa-record-dband associated hyperdrives.

Usage no npm install needed!

<script type="module">
  import arsoProjectSonarDat from 'https://cdn.skypack.dev/@arso-project/sonar-dat';
</script>

README

sonar-dat

The core. Manages islands, where each island is a kappa-record-dband associated hyperdrives.

  • Adds a full-text search engine to a kappa-record-db (through sonar-tantivy
  • Adds a simple file system per island (as hyperdrives
  • Includes an IslandStore to manage several islands
  • Includes a networking module to share islands over hyperswarm

Example

const { IslandStore } = require('sonar-dat')

const store = new IslandStore('/tmp/database')

store.create('my-db', (err, island) => {
  // Create a schema.
  island.putSchema('doc', { 
    properties: { title: { type: 'string' } }
  })

  // Put json records.
  island.put({ schema: 'doc', value: { title: 'Hello!' })

  // Make a query.
  island.query('search', 'hello')
})