# argia

> Alternative query syntax that converts to raw SQL

Latest version **0.3.0** (published 2021-12-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install argia
pnpm add argia
yarn add argia
bun add argia
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2021-12-19 |
| First published | 2021-11-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | tearat |

## Links

- npm: https://www.npmjs.com/package/argia
- Repository: https://github.com/tearat/argia-easy-sql
- Homepage: https://github.com/tearat/argia-easy-sql#readme
- Issues: https://github.com/tearat/argia-easy-sql/issues
- npm.io page: https://npm.io/package/argia

## Recent versions

- 0.3.0 (latest) — 2021-12-19
- 0.2.2 — 2021-12-19
- 0.2.1 — 2021-11-21
- 0.2.0 — 2021-11-21
- 0.1.0 — 2021-11-15

## README

# Argia easy SQL converter

Alternative query syntax that converts to raw SQL

## Usage

```js
const argia = require("argia")

const sql = argia("users(id,title,age)") // SELECT id, title, age FROM users
const rows = await adapter.query(sql)
```

## Examples

### Select

| Argia SQL | SQL |
| ------ | ------ |
| users(*) | SELECT * FROM users |
| users(id,title,age) | SELECT id, title, age FROM users |
| users(id,title,age){3} | SELECT id, title, age FROM users LIMIT 3 |
| users(id,title,age){3,1}<title> | SELECT id, title, age FROM users ORDER BY title LIMIT 3 OFFSET 1 |
| users(id,title,age){3,1}<-age> | SELECT id, title, age FROM users ORDER BY age DESC LIMIT 3 OFFSET 1 |

### Insert

| Argia SQL | SQL |
| ------ | ------ |
| ('John Doe'\|33)>users(name, age) | INSERT INTO users (name, age) VALUES ('John Doe', 33) |

---
_Source: https://npm.io/package/argia · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
