3.0.0 • Published 5 months ago

functional-models-orm-elastic v3.0.0

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
5 months ago

Functional Models ORM Elastic

Unit Tests Coverage Status

How To Install

npm install functional-models-orm-elastic

How To Use

import { createOrm } from 'functional-models'
import { datastoreAdapter as elasticDatastore } from 'functional-models-orm-elastic'
import { Client } from '@opensearch-project/opensearch'

// Create your client.
const client = new Client({
  node: 'http://localhost:9200',
})

// Create datastoreAdapter
const datastoreAdapter = elasticDatastore.create({
  client,
})

// Create an orm for use with your models.
const orm = createOrm({ datastoreAdapter })

Notes on Running with AWS OpenSearch

One way to use the client is with a username/password and the elastic url.

Here is an example:

const url = `https://${elasticUsername}:${elasticPassword}@${elasticUrl}`

const client = new Client({
  node: url,
})
3.0.0

5 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago