1.2.0 • Published 11 months ago

advanced-mysql v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

advanced-mysql

Advanced Mysql is a Node.js module designed to simplify and streamline interactions with MySQL databases. This package makes it easier to write and manage MySQL queries, allowing you to handle database operations more efficiently and with fewer errors.

Definations

.env

DB_NAME = 'database_name'
FSQL_HOST = 'host'
FSQL_USER = 'user'
FSQL_PASSWORD = 'password'

Usage (module)

.aselect

import ASQL from "advanced-mysql"; //! Or require('advanced-mysql')

(async () => {
  const db = new ASQL("host", "user", "passwrod", "database");
  await db.createConnection();
  const data = await db.aselect({
    selects: ["username,profiles.profile_description"],
    table: "users",
    joins:{
        profiles:{
            selfKey:'id',
            table:'users',
            foreignKey:'user_profile' //! Includes profile id

        }
    }
  });
})();

.query (primitive mysql query)

import ASQL from "advanced-mysql"; //! Or require('advanced-mysql')

(async () => {
  const db = new ASQL("localhost", "root", "", "yel_emlak");
  await db.createConnection();
  const data = await db.query('SELECT * FROM users');
})();
1.2.0

11 months ago

1.1.42-fix1

11 months ago

1.1.40-fix-1

11 months ago

1.1.40-fix-0

11 months ago

1.1.3

11 months ago

1.1.41

11 months ago

1.1.40

11 months ago

1.1.34

11 months ago

1.1.33

11 months ago

1.1.42-fix

11 months ago

1.1.32

11 months ago

1.1.31

11 months ago

1.1.1

1 year ago

1.1.2

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago