Skip to content
Adrian Preuß edited this page Jun 13, 2025 · 1 revision

Configuration

Database.setType(Database.MySQL, {
        /* Connection */
        Hostname:       'localhost',
        Port:           3306,
        Username:       'root',
        password:       '',
        Database:       'test',

        /* Optional */
        Charset:        'utf8',
        Connections:    10,
        Timezone:       'Europe/Berlin'
});

RAW-Query

let result = await Database.query('SELECT * FROM id=1');
console.log(result);

/* Or with Promises and Parameter-Binding */
Database.query('SELECT * FROM id=:id', {
    id: 1
}).then((results) => {
        console.log(results);
}).catch((error) => {
        console.error(error);
});

Clone this wiki locally