Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@medable/mdctl-api-driver

Package Overview
Dependencies
8
Maintainers
8
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @medable/mdctl-api-driver

Medable Developer Client Tools :: Api DB Driver


Version published
Weekly downloads
84
decreased by-42.47%
Maintainers
8
Created
Weekly downloads
 

Readme

Source

mdctl-api-driver :: DB Driver Module

Developer Tools Driver module

This module provides the access to the db driver endpoints

How to use

const { Client } = require('@medable/mdctl-api')
const { Driver } = require('@medable/mdctl-api-driver')
const { CortexObject } = require('@medable/mdctl-api-driver/lib/cortex.object')

// a global org object will be created using the default mdctl credentials

const result = await org.objects.c_my_object.find() // will return a Transform stream.
const result = await org.objects.c_my_object.find().toArray() // will return an array with results

// using bulk operations

const result = await org.objects.bulk()
    .add(org.objects.c_my_object.inserOne({}), {
        name: 'InserOne',
        halt: true,
        wrap: true,
        output: true
    })
    .add(org.objects.c_my_object.find({c_name: 'test'}), {
         name: 'Results',
         halt: true,
         wrap: true,
         output: true
     })
     .toArray()


// In case you want to use a different credentials/environment

const driver = new Driver(new Client({environment, credentials}))
const obj = new CortexObject('c_my_object', driver)

const result = await obj.find({c_name: 'test'})

FAQs

Last updated on 29 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc