Skip to content

Instantly share code, notes, and snippets.

View brycecorbitt's full-sized avatar
:bowtie:

Bryce Corbitt brycecorbitt

:bowtie:
View GitHub Profile
@evansiroky
evansiroky / sequelizeBulkInsert.js
Created September 29, 2015 19:13
Insert CSV using sequelize bulk insert
var fs = require('fs'),
async = require('async'),
csv = require('csv');
var input = fs.createReadStream(filename);
var parser = csv.parse({
columns: true,
relax: true
});
@ssokolow
ssokolow / pagination_example.sql
Created December 23, 2009 13:02
Reasonably efficient pagination without OFFSET (SQLite version)
-- Reasonably efficient pagination without OFFSET
-- SQLite version (Adapted from MS SQL syntax)
-- Source: http://www.phpbuilder.com/board/showpost.php?p=10376515&postcount=6
SELECT foo, bar, baz, quux FROM table
WHERE oid NOT IN ( SELECT oid FROM table
ORDER BY title ASC LIMIT 50 )
ORDER BY title ASC LIMIT 10