Registry / database / hapiest-mysql

hapiest-mysql

JSON →
library0.0.51jsnpmunverified

A wrapper around the mysql package that provides a more descriptive and fluent way of running queries, designed for use with hapi.js applications. Version 0.0.51 is the latest stable release, but the package appears to be in early development with no recent updates. It differentiates by offering a promise-based query builder, but lacks thorough documentation and has minimal adoption compared to more robust ORMs like Sequelize or TypeORM.

npm install hapiest-mysql
INSTALL
IMPORT
SIG · HAPIEST-MYSQL
H
hapiest-mysql
databasejavascriptv0.0.51
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import HapiestMySQL from 'hapiest-mysql'
const HapiestMySQL = require('hapiest-mysql').default
Package may not export default correctly; check for CommonJS compatibility.
HapiestMySQL
const { HapiestMySQL } = require('hapiest-mysql')
import { HapiestMySQL } from 'hapiest-mysql'
Package is CommonJS, so require is preferred. Named export may not exist.
mysql
import mysql from 'mysql'
const mysql = require('mysql').default
Parent mysql package uses CommonJS; import default works in ES6.

Demonstrates basic setup and query execution using hapiest-mysql with promise-based API.

import HapiestMySQL from 'hapiest-mysql'; const config = { host: process.env.DB_HOST ?? 'localhost', user: process.env.DB_USER ?? 'root', password: process.env.DB_PASS ?? '', database: process.env.DB_NAME ?? 'test' }; const db = new HapiestMySQL(config); db.query(`SELECT * FROM users WHERE id = ?`, [1]) .then(results => console.log(results)) .catch(err => console.error(err)); db.close();
Debug
Known issues
deprecatedPackage is no longer actively maintained; use at your own risk.
fix
Consider migrating to mysql2 or sequelize.
affects: >=0.0.1
breakingAPI may change without notice; version 0.x indicates unstable API.
fix
Pin to specific version and test thoroughly.
affects: >=0.0.0 <1.0.0
gotchaNo type definitions provided; TypeScript users need custom type declarations.
fix
Create a .d.ts file or use @types/mysql for basic types.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'hapiest-mysql'
Package not installed or not in node_modules.
fix
Run npm install hapiest-mysql@0.0.51
HapiestMySQL is not a constructor
Incorrect import style; package may not export default.
fix
Use const HapiestMySQL = require('hapiest-mysql').HapiestMySQL;
Upgrade
Version history
0.0.51latest on npm
Audit
Dependencies
mysqlrequiredCore dependency for MySQL database connectivity
Agent activity
7 hits · last 30 days
node
6
Resources
hapiest-mysql — npm install hapiest-mysql · libregistry