Project

lucid_sql

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Read SQL statements from files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 12.3
~> 3.6
= 0.52.0
~> 5.10
 Project Readme

lucid_sql

Installation

Add the gem to your ‘Gemfile’:

gem 'lucid_sql'

Usage

Without Sequel gem

sql = LucidSQL::Repository.new('sql/*.sql')

sql.select_unpublished_products # sql/select_unpublished_products.sql

Interpolate trusted data for query reuse (see String#%).

sql.copy_from_stdin(table: 'products')

Does not support bind parameters.

With Sequel gem

sql = LucidSQL::SequelRepository.new('sql/*.sql')

Splat arguments are bind parameters (see Sequel.lit).

sql.copy_from('/path/to/copy_data/products', table: 'products')