An open API service indexing awesome lists of open source software.

https://github.com/onfirenetwork/onsettypescriptorm

Onset MariaDB ORM in Typescript
https://github.com/onfirenetwork/onsettypescriptorm

database mariadb onset orm

Last synced: about 2 months ago
JSON representation

Onset MariaDB ORM in Typescript

Awesome Lists containing this project

README

          

# OnsetTypescriptORM

Onset MariaDB ORM in Typescript

## Installation
```
npm install @onfire-network/onset-typescript-orm --save
```

## Example
```typescript
interface User {
id: number;
name: string;
steam_id: string;
}
let conn = new MariaDB.Connection("localhost", "myuser", "changeme123", "mydatabase");
let usersTable = new Table(conn, "users");
usersTable.get("SELECT * FROM users", users => {
users.forEach(user => {
Server.broadcast(user.name);
});
});
conn.close();
```