{"id":42505,"library":"ci_mariasql","title":"mariasql","description":"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.","status":"deprecated","version":"0.1.21","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/mscdex/node-mariasql","tags":["javascript","cione"],"install":[{"cmd":"npm install ci_mariasql","lang":"bash","label":"npm"},{"cmd":"yarn add ci_mariasql","lang":"bash","label":"yarn"},{"cmd":"pnpm add ci_mariasql","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS only; no ESM export exists.","wrong":"import Client from 'mariasql';","symbol":"Client","correct":"const Client = require('mariasql');"},{"note":"Use `new Client()` to instantiate; query returns an event emitter.","wrong":"const c = Client.create(); c._query(...)","symbol":"Client instance methods","correct":"const c = new Client(); c.query(...)"},{"note":"The method is `query`, not `exec` or `execute`.","wrong":"c.exec('SELECT * FROM users');","symbol":"query method","correct":"c.query('SELECT * FROM users');"}],"quickstart":{"code":"const Client = require('mariasql');\nconst c = new Client();\nc.connect({\n  host: '127.0.0.1',\n  user: 'foo',\n  password: 'bar'\n});\nc.on('connect', () => console.log('Connected'))\n .on('error', err => console.error(err))\n .on('close', hadError => console.log('Closed'));\nc.query('SHOW DATABASES')\n .on('result', res => {\n   res.on('row', row => console.log(row))\n      .on('end', () => console.log('Result end'));\n })\n .on('end', () => c.end());","lang":"javascript","description":"Connects to MariaDB, runs SHOW DATABASES, and streams results row-by-row using event emitters."},"warnings":[{"fix":"Migrate to the 'mariadb' npm package (official MariaDB Connector/Node.js) or 'mysql2'.","message":"This package is no longer maintained. Use 'mariadb' or 'mysql2' instead.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Install build-essential (Linux) or Xcode (macOS). On newer Node versions, switch to a pure JavaScript driver.","message":"Requires native compilation (node-gyp). Fails on Node.js >= 12 without C++ build tools.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Always attach error listeners on both Client and result objects.","message":"Event-based query API differs from typical promise-based drivers; easy to miss error handling.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.1.21':17 '0.8.0':61 'addon':69 'addon-bas':68 'api':38 'async':26 'base':70 'behavior':27 'bind':4 'block':10,36 'c':67 'cion':81 'client':14,37 'compat':13 'consid':75 'driver':21,71 'javascript':80 'librari':15,29 'linux':56 'mac':58 'mariadb':6,31,77 'mariasql':1 'modern':73 'mysql':12,20 'mysql-compat':11 'mysql2':79 'name':42 'nativ':33 'node.js':3,60,74 'non':9,35 'non-block':8,34 'note':62 'older':66 'placehold':41 'prepar':44 'queri':45 'requir':59 'result':52 'row':49,51 'row-by-row':48 'stream':47 'support':40 'test':53 'thread':24 'unlik':18 'use':23,30,76 'version':16 'window':55","created_at":"2026-06-05T16:55:19.040491+00:00","updated_at":"2026-06-05T16:55:19.040491+00:00","problems":[{"fix":"Reinstall with `npm rebuild mariasql` or ensure build tools are installed.","cause":"Native addon not compiled correctly for the current Node.js version.","error":"Error: The specified module could not be found. \\?\\...\\mariasql\\build\\Release\\mariasql.node"},{"fix":"Use CommonJS require: `const Client = require('mariasql');`","cause":"Using `import Client from 'mariasql'` instead of `const Client = require('mariasql')`.","error":"Client is not a constructor"},{"fix":"Check your data for duplicates or use INSERT IGNORE / ON DUPLICATE KEY UPDATE.","cause":"Inserting duplicate values into a unique/primary key column.","error":"Error: ER_DUP_ENTRY: Duplicate entry '...' for key '...'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/mscdex/node-mariasql","github":"ssh://git@github.com/mscdex/node-mariasql","docs":null,"changelog":null,"pypi":null,"npm":"ci_mariasql","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}