@axelote/js v0.2.3
Axelote JS
Light and fast Axelote library for requesting data using SQL from frontend application.
Official website: https://axelote.com
Official docs: https://axelote.com/docs#js
Table of Contents
Features
- Execute SQL statements directly via JavaScript API asynchronous
- Make transactional executions
- Construct complex SQL statements using query builder
- Store SQL statements in good manner using repositories
Installation
Using npm:
$ npm install @axelote/js
Example
Initialize Axelote
const axelote = new Axelote({
url: "http://my-api-itegrated-with-axelote"
});
Execute simple select query using promise
axelote.returning('@sql select * from person').then((data) => {
});
Execute simple insert query using await/async
await axelote.void('@sql insert into person (name) values (?)', ['Joe']);
Execute simple update query in transaction
let tx: AxeloteTransaction = await axelote.transaction();
await tx.void('@sql update person set name = :name where id = :id', { id: 5, name: 'Sarah'});
await tx.commit();
Authorization / authentication
There are no big cons of creating registration/login mechanism with Axelote; however it is still better to keep this logic on backend side, thus password encoding may be sensitive and external integrations also need to be done on backend side if required.
Axelote offers rules system to manage security on queries level and that can be implemented using Axelote Adapter.
Raw queries
For development account, queries are not hashed. Only for production build queries are hashed.
Resources
- Architecture See CHANGELOG.MD
License
Axelote CLI is completely free to use. See LICENSE.md or License page
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago