Skip to content

Instantly share code, notes, and snippets.

@jers0
jers0 / json_postgres.js
Created September 16, 2020 21:46 — forked from lucdew/json_postgres.js
Example of json document storage in postgresql and querying (with knex.js)
var connectionString = 'postgres://localhost:5432/postgres';
var Promise=require('bluebird');
var knex = require('knex')({
client: 'pg',
connection: {
user: 'postgres',
database: 'postgres',
port: 5432,
@jers0
jers0 / gist:53c0e72f11e3bfc6b1614a5c9df373f3
Created February 24, 2020 22:02 — forked from resmall/gist:51b328aa303b15979e77
Imports an sql file and execute the script in Laravel Seeder
public function run() {
DB::unprepared(File::get('path/to/SQL/file'));
}