Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
panda-es-orm
Advanced tools
One simple ORM used for ES 5./6. in order to easily manage your data.
All code resides under src/lib
folder.
Browse the examples section as it contains various cases. The ES connection is exposed therefore sky is the limit here, so you have a lot of flexibility.
Initiate an ES connection and expose it to the plugin.
Simple logger for internal usage. It supports various drivers which should implement logging methods present under the current console logger (lib/logger/console). The console logger is the default option. Also, you can use other external packages such as ain.
Object wrapper for an ES query - it supports everything you might think of based on your ES knowledge. Also, by passing the connection reference, all queries are executed at this point.
Bounds a model instance by it's index and desired type. For missing ids on indexing new documents, uuid are generated and used in the query. Another feature is that the Model class can be extended if there's any custom logic which needs to be put in place. Management methods implemented:
Main element - initializes the ES connection, bounds each model, injects all dependencies and does some integrity/configuration checks.
A list of internal functions used in order to check/decorate/parse things.
A simple wrapper which uses joi schema validation. It's used for validating data before it gets written in the database accordingly on the provided schema for one model. This step is optional for your project and it only depends on your model configuration when it gets initialized.
Data can be modified for models through event listeners attached on models.
The configuration is quite simple and for the moment it only addresses the ORM and the logger.
Eg.
{
connection: { // elasticsearch package config
host: '10.10.10.1:9200',
requestTimeout: 2000
},
logger: { // passed to the internal logger
level: 10
}
}
See the changelog file.
0.1.0 - first version (master)
FAQs
ES ORM adding the ability to add models and validation to your models
We found that panda-es-orm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.