# Introduction

## Installing npm

```
npm install --save xariona-db
```

{% hint style="info" %}
Danger! node engine version 12.x recommended
{% endhint %}

Horay! lets setup the module!

```javascript
const Xariona = require("xariona-db")
const db = new Xariona("json") // JSON and sqlite are supported
```

## Examples

```javascript
const Xariona = require("xariona-db")
const db = new Xariona("json")

db.setAndSave("userData.bio", "hello i am the user!")
// -> true

db.getFromDb("userData.bio")
// -> "hello i am the user!"

db.fetchFromDb("userData.bio")
// -> "hello i am the user!"

db.setAndSave("userData", { certificate: true, bio: "hello i am the user!" })
// -> true

db.deleteAndSave("userData")
// -> true

db.pushAndSave("userData.jobs", ["cooker", "mamamia"]) 
// -> true

db.version() 
// -> 1.0.x
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xariona-devs.gitbook.io/xariona-db/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
