service-datasource

2.0.2 • Public • Published

service-datasource

Augmented.js Next Service - Datasource helper module

API

Table of Contents

DataSource

The datasource object for use as an interface for a datasource

getConnection

Properties

  • client object The client for use in the DataSource

getConnection

Properties

  • url string The url for the datasource (if applicable)

getConnection

Properties

  • db object The database (or simular) for the datasource (if applicable)

getConnection

Properties

  • collection object The collection for use in the DataSource

getConnection

Returns boolean Returns true if a connection is established

closeConnection

Returns boolean Returns true if a connection is established

insert

Parameters

remove

Parameters

update

Parameters

query

Parameters

  • query object The query object
  • callback function A callback to execute during the query

Returns object Returns a value from the query or response code

collection

Returns object Returns the collection

collection

Parameters

  • name string The name of the collection

client

Returns object Returns the client

SOLRDataSource

Extends Augmented.Service.DataSource

The SOLR datasource instance class - WIP

DataSourceFactory

The datasource factory to return an instance of a datasource configured by type

MongoDataSource

Extends DataSource

The MongoDB datasource instance class

Parameters

  • client

Package Sidebar

Install

npm i service-datasource

Weekly Downloads

1

Version

2.0.2

License

Apache-2.0

Unpacked Size

843 kB

Total Files

52

Last publish

Collaborators

  • thedocbwarren