Skip to content

OnfireNetwork/OnsetTypescriptORM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OnsetTypescriptORM

Onset MariaDB ORM in Typescript

Installation

npm install @onfire-network/onset-typescript-orm --save

Example

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

Releases

No releases published

Packages

No packages published