Socket
Book a DemoInstallSign in
Socket

functional-models-orm-elastic

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

functional-models-orm-elastic

A functional-models datastore adapter for Opensearch/Elastic.

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
0
Created
Source

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,
})

Keywords

orm

FAQs

Package last updated on 30 Jan 2025

Did you know?

Socket

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