UNPKG

sphinxql

Version:

SphinxQL query builder for Node.JS. Supports Sphinx search(2.x and 3.x) and Manticore search

21 lines (18 loc) 496 B
import * as mysql from 'mysql2'; import ClientBase from './ClientBase'; /** * This implements the connection class for Sphinx/Manticore * client. It uses the same protocol that MySQL client. * * Example usage: * const connection = new SphinxClient(options); */ export default class SphinxClient extends ClientBase { public constructor(options: object) { super(); this.connection = mysql.createConnection(options); } public close(): void { this.connection.end(); } };