0.2.3 • Published 2 years ago

@axelote/js v0.2.3

Weekly downloads
-
License
LICENSE.MD
Repository
-
Last release
2 years ago

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

License

Axelote CLI is completely free to use. See LICENSE.md or License page

0.2.3

2 years ago

0.2.2

2 years ago

0.2.0-beta

2 years ago

0.2.1-beta

2 years ago

0.1.9-alpha

2 years ago

0.2.0

2 years ago

0.1.8-alpha

2 years ago

0.1.7-alpha

2 years ago

0.1.6-alpha

2 years ago

0.1.5-alpha

2 years ago

0.1.4-alpha

2 years ago

0.1.3-alpha

2 years ago

0.1.2-alpha

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago