Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
[ANN] SqlStatement 1.0.0 - hide the syntax of SQL behind familiarruby syntax
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Ken Bloom, post: 4530991"] sqlstatement - Generate complex SQL statements programmatically The main goal of this library is to be able to construct an SQL statement from "slices" that concern different aspects of the final query (perhaps in different places in your code) and then combine them all together into one statement easily. Another important goal of this library is to give some consistent Ruby syntax to three statements (INSERT, SELECT, and UPDATE) that seem to have different enough syntax that one has two write different code to generate each kind of statement. I use my SQL database (specifically MySQL) largely as a bulk data processing engine, by doing INSERT...SELECT or CREATE TABLE...SELECT statements. This library is intended to make that kind of coding easier. I expect that Object Relational mappers (such as ActiveRecord) are more useful for most people, who are performing queries and inserting/updating/querying for individual records. I have nevertheless added INSERT...VALUES statements, and will add other statements soon, for consistency. This library is inspired by CLSQL for Common LISP, or SchemeQL for Scheme, although it is very different from these two libraries. Scheme and LISP‘s use of s-expressions make it very easy to construct an entire sublanguage for the WHERE clause, simply by list parsing. The Criteria library for Ruby has attempted this, but in a more limited manner than SchemeQL or CLSQL. My library aims to cover much of the functionality in these libraries. This library doesn‘t try to abstract out the limitations of your DBMS, and I think that the SQL it uses should be fairly portable, in large measure because it hasn‘t attempted to deal with serious CREATE TABLE statements, where a lot of syntax concerning types, keys and sequences is much more variable. This library can be downloaded from [URL]http://rubyforge.org/projects/sqlstatement/[/URL] Its rdoc documentation is online at [URL]http://sqlstatement.rubyforge.org/[/URL] License: BSD license [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
[ANN] SqlStatement 1.0.0 - hide the syntax of SQL behind familiarruby syntax
Top