Registry / database / ci_mariasql

ci_mariasql

JSON →
library0.1.21jsnpmunverified

A Node.js binding to MariaDB's non-blocking (MySQL-compatible) client library, version 0.1.21. Unlike other MySQL drivers that use threads for async behavior, this library uses MariaDB's native non-blocking client API. It supports placeholders (:named and ?), prepared queries, and streaming row-by-row results. Tested on Windows, Linux, and Mac. Requires Node.js >=0.8.0. Note: this is an older, C++ addon-based driver; for modern Node.js, consider using mariadb or mysql2.

npm install ci_mariasql
INSTALL
IMPORT
SIG · CI_MARIASQL
C
ci_mariasql
databasejavascriptv0.1.21
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.

Client
✓ const Client = require('mariasql');
✗ import Client from 'mariasql';
This package is CommonJS only; no ESM export exists.
Client instance methods
✓ const c = new Client(); c.query(...)
✗ const c = Client.create(); c._query(...)
Use `new Client()` to instantiate; query returns an event emitter.
query method
✓ c.query('SELECT * FROM users');
✗ c.exec('SELECT * FROM users');
The method is `query`, not `exec` or `execute`.

Connects to MariaDB, runs SHOW DATABASES, and streams results row-by-row using event emitters.

const Client = require('mariasql'); const c = new Client(); c.connect({ host: '127.0.0.1', user: 'foo', password: 'bar' }); c.on('connect', () => console.log('Connected')) .on('error', err => console.error(err)) .on('close', hadError => console.log('Closed')); c.query('SHOW DATABASES') .on('result', res => { res.on('row', row => console.log(row)) .on('end', () => console.log('Result end')); }) .on('end', () => c.end());
Debug
Known issues
deprecatedThis package is no longer maintained. Use 'mariadb' or 'mysql2' instead.
fix
Migrate to the 'mariadb' npm package (official MariaDB Connector/Node.js) or 'mysql2'.
affects: >=0.0.0
breakingRequires native compilation (node-gyp). Fails on Node.js >= 12 without C++ build tools.
fix
Install build-essential (Linux) or Xcode (macOS). On newer Node versions, switch to a pure JavaScript driver.
affects: >=0.1.0
gotchaEvent-based query API differs from typical promise-based drivers; easy to miss error handling.
fix
Always attach error listeners on both Client and result objects.
affects: >=0.0.0
Errors
Common errors & fixes
Error: The specified module could not be found. \?\...\mariasql\build\Release\mariasql.node
Native addon not compiled correctly for the current Node.js version.
fix
Reinstall with `npm rebuild mariasql` or ensure build tools are installed.
Client is not a constructor
Using `import Client from 'mariasql'` instead of `const Client = require('mariasql')`.
fix
Use CommonJS require: `const Client = require('mariasql');`
Error: ER_DUP_ENTRY: Duplicate entry '...' for key '...'
Inserting duplicate values into a unique/primary key column.
fix
Check your data for duplicates or use INSERT IGNORE / ON DUPLICATE KEY UPDATE.
Upgrade
Version history
0.1.21latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
ci_mariasql — npm install ci_mariasql · libregistry