npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

harper-manager

v1.0.11

Published

Unofficial node-js module for managing harperdb database

Downloads

3

Readme

Harper Manager

Unofficial node-js module to manage your haperdb database in a simplified way.

Usage

Using Harper Manager is very easy,

install the package using

npm install harper-manager or

yarn add harper-manager.

require it in your app , and instantiate it using new keyword,


var { HarperManager }=require("harper-manager");

or 
// ES6 import
import { HarperManager } from "harper-manager";

var options={
   host:process.env.db_host,  /* your host url, ex: http://localhost:9925 or https://xxxxxx.harperdbcloud.com */,
   key:process.env.db_key,  // your Basic auth token,
   
       //schema is optional, but if you include it
    // HarperManager will create it for you if it doesn't exist yet.

   schema: "pets"
}
var myDB = new HarperManager(options);

Now you can start using it to perform every operation.


myDB.createSchema("pets") ;

myDB.createTable({schema:"pets",table:"cats"}) ;

myDB.insert({schema:"pets",table:"cats",records:[{id:1,dog_name:"smiley",age:3}]})

what you can do with HarperManager

  • get the structure of your database using the .describeDB() method.
  • create schema using the .createSchema(schema) method.
  • drop schema using the .dropSchema(schema) method.
  • describe schema using the .describeSchema(schema) method.
  • create table using the .createTable(options) method.
  • drop table using the .dropTable(options) method.
  • describe table using the .describeTable(options) method.
  • insert data using the .insert(options) method.
  • upsert data using the .upsert(options) method.
  • update data using the .update(options) method.
  • delete data using the .delete(options) method.
  • search by hash using the .searchByHash(options) method.
  • search by value using the .searchByValue(options) method.
  • search by conditions using the .searchByConditions(options) method.
  • upload data using .csvUrlLoad(options) method.

What you should know about HarperManager.

HarperManager is not an extension to harperdb, you can only perform operations that are available by Harperdb.

  • Every method returns a Promise, this means you will need to use .then() and .catch() to get the response or errors.
  • the methods that requires options must be passed in as an Object {}.
  • you can insert data into a table not yet created, HarperManager will automatically create the table and insert the data for you.

Available methods and their options.

To better understand HarperManager's options, you should refer to the harperdb docs page.

  • method:describeDB() | param: none.

  • method: createSchema() | param : Type- string the name of the schema you want to create.

  • method: dropSchema() | param : Type- string the name of the schema you want to drop.

  • method: describeSchema() | param : Type- string the name of the schema you want to describe.

  • method: createTable() | options : Type- Object

    • schema: required ,
    • table: required
    • hashAttribute: required (if not specified, will default to id).
  • method: dropTable() | options : Type- Object

    • schema: required,
    • table: required.
  • method: describeTable() | options : Type- Object

    • schema: required,
    • table: required.
  • method: insert() | options : Type- Object

    • schema: required
    • table: required
    • records: required `
  • method: delete() | options : Type- Object

    • schema: required,
    • table: required,
    • hashValues: required.
  • method: update() | options : Type- Object

    • schema: required,
    • table: required,
    • records: required.
  • method: upsert() | options : Type- Object

    • schema: required,
    • table: required,
    • records: required.
  • method: searchByHash() | options: Type- Object

    • schema:required,
    • table: required,
    • hashValues:required,
    • getAttributes: required (if not specified, will default to wildcard `["*"]``).
  • method: searchByValue() | options: Type- Object

    • schema:required,
    • table: required,
    • searchValue:required,
    • searchAttribute:required,
    • getAttributes: required (if not specified, will default to wildcard ["*"]).
  • method: searchByConditions() | options: Type- Object

    • schema:required,
    • table: required,
    • operator: optional (will default to "and")
    • offset:optional (will default to 0),
    • limit:optional (will default to null),
    • getAttributes: required (if not specified, will default to wildcard ["*"]);
  • method: csvUrlLoad() | options : Type- Object

    • schema: required,
    • table: required,
    • csvUrl: required.