Hello, Github: https://github.com/tshemsedinov/node-mysql-utilities NPM: https://npmjs.org/package/mysql-utilities
Utilities for node-mysql driver <https://github.com/felixge/node-mysql>with specialized result types, introspection and other helpful functionality for node.js. Initially this utilities were part of Impress Application Server https://npmjs.org/package/impress and extracted separately for use with other frameworks. *MySQL Data Access Methods* - Query selecting single row: connection.queryRow(sql, values, callback) - Query selecting scalar (single value): connection.queryValue(sql, values, callback) - Query selecting column into array: connection.queryCol(sql, values, callback) - Query selecting hash of records: connection.queryHash(sql, values, callback) - Query selecting key/value hash: connection.queryKeyValue(sql, values, callback) *MySQL Introspection Methods* - Get primary key metadata: connection.primary(table, callback) - Get foreign key metadata: connection.foreign(table, callback) - Get table constraints metadata: connection.constraints(table, callback) - Get table fields metadata: connection.fields(table, callback) - Get connection databases array: connection.databases(callback) - Get database tables list for current db: connection.tables(callback) - Get database tables list for given db: connection.databaseTables(database, callback) - Get table metadata: connection.tableInfo(table, callback) - Get table indexes metadata: connection.indexes(table, callback) - Get server process list: connection.processes(callback) - Get server global variables: connection.globalVariables(callback) - Get server global status: connection.globalStatus(callback) - Get database users: connection.users(callback) *MySQL SQL Statements Autogenerating Methods* - Selecting record(s): connection.select(table, whereFilter, callback) - Inserting record: connection.insert(table, row, callback) - Updating record: connection.update(table, row, callback) - Inserting or selecting record: connection.upsert(table, row, callback) - Count records with filter: connection.count(table, whereFilter, callback) - Delete record(s): connection.delete(table, whereFilter, callback) *Events* - Catch any query execution: connection.on('query', function(err, res, fields, query) {}); - Catch errors: connection.on('error', function(err, query) {}); - Catch slow query execution: connection.on('slow', function(err, res, fields, query, executionTime) {}); Best regards, ~Timur -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
