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

oute-services-db-connection-sdk

v0.0.7

Published

- Initialization

Downloads

184

Readme

This module expose helper functions

  • Initialization
  params = {
    url: @server url
    token: @access token
  }
  DbConnection = require("oute-services-db-connection-sdk")
  db_connection_instance = new DbConnection(params)

Cache functions

Core functions

  • Save deployment
  body = {
    "_id": "mandb1",
    "name": "Postgres SQL",
    "thumbnail": "https://ccc.oute.app/cdata/db_hub/postgres.svg",
    "db_type": "postgres",
    "parent_id": "q-GmTD5-K",
    "workspace_id": "ZzBfJMpfQ",
    "configs": [],
    "state": "ACTIVE"
  }
  await db_connection_instance.save(body)
  • get db hub list
  query = {}
  await db_connection_instance.dbHubList(query)
  • delete by id
  connection_id = "mandb1"
  await db_connection_instance.deleteById(connection_id)
  • get by parent id
  query = {
    parent_id: "q-GmTD5-K"
  }
  await db_connection_instance.getByParent(query)
  • map to assets
  body = {
    "connection_ids": ["mandb1"],
    "workspace_id": "ZzBfJMpfQ",
    "asset_id" : "q-GmTD5-K"
  }
  await db_connection_instance.mapToAsset(body)
  • Test connection
  body: {
    connection_id: "mandb1", //Send this to save the schema for the given connections
    state: {},
    db_config: {"db_type": "postgres","configs": []},
    options: {logging: false}
  }
  await db_connection_instance.testConnection(body)
  • get tables
  query: {
    connection_id: "mandb1"
  }
  await db_connection_instance.getTables(query)
  • get table fields
  query: {
    connection_id: "mandb1",
    table_id: "Wz6viqLBxkU"
  }
  await db_connection_instance.getTableFields(query)