@arso-project/sonar-core

    0.3.0-alpha.7 • Public • Published

    sonar-core

    The core. Manages islands, where each island is a kappa-record-db and 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 islands
    • Includes a networking module to share islands over hyperswarm

    Example

    const { IslandStore } = require('sonar-core')
    
    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', (err, results) => 7
        console.log(results)
      })
    })

    Keywords

    none

    Install

    npm i @arso-project/sonar-core

    DownloadsWeekly Downloads

    6

    Version

    0.3.0-alpha.7

    License

    GPL-3.0

    Unpacked Size

    81.9 kB

    Total Files

    20

    Last publish

    Collaborators

    • frando