2.3.0 • Published 7 years ago

plywood-mysql-requester v2.3.0

Weekly downloads
670
License
Apache-2.0
Repository
github
Last release
7 years ago

plywood-mysql-requester

This is the MySQL requester making abstraction layer for plywood.

Given a MySQL query and an optional context it return a Q promise that resolves to the data table.

Installation

To install run:

npm install plywood-mysql-requester

Usage

In the raw you could use this library like so:

mySqlRequesterGenerator = require('plywood-mysql-requester').mySqlRequester

mySqlRequester = mySqlRequesterGenerator({
  host: 'my.mysql.host',
  database: 'all_my_data',
  user: 'HeMan',
  password: 'By_the_Power_of_Greyskull'
})

mySqlRequester({
  query: 'SELECT `cut` AS "Cut", sum(`price`) AS "TotalPrice" FROM `diamonds` GROUP BY `cut`;'
})
  .then(function(res) {
    console.log("The first row is:", res[0])
  })
  .done()

Although usually you would just pass mySqlRequester into the MySQL driver that is part of Plywood.

Tests

Currently the tests run against a real MySQL database that should be configured (database, user, password) the same as what is indicated in test/info.coffee.

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

9 years ago

2.0.1

9 years ago

1.3.3

9 years ago

1.3.2

9 years ago

1.3.1

9 years ago

1.2.6

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.1.7

10 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago