Merge pull request #144 from rpflorence/master
Syntax highlighting for the README
This commit is contained in:
commit
fe10d8544a
@ -10,6 +10,7 @@ Non-blocking PostgreSQL client for node.js. Pure JavaScript and native libpq bi
|
||||
|
||||
### Simple, using built-in client pool
|
||||
|
||||
```javascript
|
||||
var pg = require('pg');
|
||||
//or native libpq bindings
|
||||
//var pg = require('pg').native
|
||||
@ -23,9 +24,11 @@ Non-blocking PostgreSQL client for node.js. Pure JavaScript and native libpq bi
|
||||
console.log("Current year: %d", result.rows[0].when.getYear());
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### Evented api
|
||||
|
||||
```javascript
|
||||
var pg = require('pg'); //native libpq bindings = `var pg = require('pg').native`
|
||||
var conString = "tcp://postgres:1234@localhost/postgres";
|
||||
|
||||
@ -64,6 +67,7 @@ Non-blocking PostgreSQL client for node.js. Pure JavaScript and native libpq bi
|
||||
query.on('end', function() {
|
||||
client.end();
|
||||
});
|
||||
```
|
||||
|
||||
### Example notes
|
||||
|
||||
@ -164,6 +168,3 @@ Copyright (c) 2010 Brian Carlson (brian.m.carlson@gmail.com)
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user