ESLint plugin to format SQL query in template literals
🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).
Simple SQL escape and format for MySQL
Formats SQL queries. Part of SQLTools
Format whitespace in a SQL query to make it more readable
An SQL-friendly ORM for Node.js
React Query Builder component for constructing queries and filters, with utilities for executing them in various database and evaluation contexts
SQL linting rules for ESLint.
Summarize any SQL query
A JavaScript library for connecting securely to your Cloud SQL instances
SQL query construction and analysis.
ES2015 tagged template string for preparing SQL statements, works with `pg`, `mysql`, `sqlite` and `oracledb`
An opinionated sql formatter plugin for Prettier
Node.js implementation of PostgreSQL's format() to safely create dynamic SQL queries.
PHC string format serializer/deserializer
For documentation, see https://www.atdatabases.org/docs/split-sql-query
PostgreSQL interface for Node.js
Microsoft SQL Server client for Node.js.
A fully typed TypeScript and Node.js implementation of PostgreSQL format() to safely create dynamic SQL queries. SQL identifiers and literals are escaped to help prevent SQL injection.
A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3
Node.js implementation of PostgreSQL's format() to safely create dynamic SQL queries.
A SQL parser and executer for Cosmos DB
A RESTful API for managing your Postgres.
Fastest full featured PostgreSQL client for Node.js
This is a simple and nice gem for SQL prettifying and formatting. Niceql splits, indent and colorize SQL query and PG errors if any. Could be used as a standalone gem without any dependencies. Seamless ActiveRecord integration via rails_sql_prettifier gem.
The sqlite print table gem is used to print a formatted table from a sqlite database using a SQL query.
RestfulQuery provides a simple interface in front of a complex parser to parse specially formatted query hashes into complex SQL queries. It includes ActiveRecord and Sequel extensions.
RestfulQuery provides a simple interface in front of a complex parser to parse specially formatted query hashes into complex SQL queries. It includes ActiveRecord and Sequel extensions.
Rails3 Version of RestfulQuery, provides a simple interface in front of a complex parser to parse specially formatted query hashes into complex SQL queries. It includes ActiveRecord and Sequel extensions.
Text2SQL is a gem designed to generate SQL queries from natural language inputs. It leverages machine learning models to interpret schema files and user inputs, generating SQL queries that can be executed and returning results in a human-readable format.
LogBench is a well-structured Ruby gem for parsing and analyzing Rails log files with a focus on lograge format. Features include real-time log monitoring, interactive TUI with filtering and sorting, domain objects for clean code organization, and support for SQL query analysis.
Organise ActiveRecord model into a tree structure
Ancestry allows the records of a ActiveRecord model to be organised in a tree structure, using a single, intuitively formatted database column. It exposes all the standard tree structure relations (ancestors, parent, root, children, siblings, descendants) and all of them can be fetched in a single sql query. Additional features are named_scopes, integrity checking, integrity restoration, arrangement of (sub)tree into hashes and different strategies for dealing with orphaned records.
= Webservice Client Library for InterMine Data-Warehouses This library provides an interface to the InterMine webservices API. It makes construction and execution of queries more straightforward, safe and convenient, and allows for results to be used directly in Ruby code. As well as traditional row based access, the library provides an object-orientated record result format (similar to ActiveRecords), and allows for fast, memory efficient iteration of result sets. == Example Get all protein domains associated with a set of genes and print their names: require "intermine/service" Service.new("www.flymine.org/query"). new_query("Pathway") select(:name). where("genes.symbol" => ["zen", "hox", "h", "bib"]). each_row { |row| puts row[:name]} == Who is this for? InterMine data warehouses are typically constructed to hold Biological data, and as this library facilitates programmatic access to these data, this install is primarily aimed at bioinformaticians. In particular, users of the following services may find it especially useful: * FlyMine (http://www.flymine.org/query) * YeastMine (http://yeastmine.yeastgenome.org/yeastmine) * RatMine (http://ratmine.mcw.edu/ratmine) * modMine (http://intermine.modencode.org/release-23) * metabolicMine (http://www.metabolicmine.org/beta) == How to use this library: We have tried to construct an interface to this library that does not require you to learn an entirely new set of concepts. As such, as well as the underlying methods that are common to all libraries, there is an additional set of aliases and sugar methods that emulate the DSL style of SQL: === SQL style service = Service.new("www.flymine.org/query") service.model. table("Gene"). select("*", "pathways.*"). where(:symbol => "zen"). order_by(:symbol). outerjoin(:pathways). each_row do |r| puts r end === Common InterMine interface service = Service.new("www.flymine.org/query") query = service.new_query("Gene") query.add_views("*", "pathways.*") query.add_constraint("symbol", "=", "zen") query.add_sort_order(:symbol) query.add_join(:pathways) query.each_row do |r| puts r end For more details, see the accompanying documentation and the unit tests for interface examples. Further documentation is available at www.intermine.org. == Support Support is available on our development mailing list: dev@intermine.org == License This code is Open Source under the LGPL. Source code for this gem can be checked out from https://github.com/intermine/intermine-ws-ruby
= sql_valued_columns SqlValuedColumns is an ActiveRecord plugin that will let you have specific SQL statements executed on INSERT / UPDATE. It will call the SQL function you provide, passing the arguments specified in the call to sql_column. See the documentation for SqlValuedColumns::ClassMethods#sql_column for more information regarding usage, including passing Strings and Proc objects as arguments to your SQL function. Example: You have a model with two columns, one named "another_column" and the other named "size_of_another_column". Whenever you insert data into "another_column", you want to have size_of_another_column have the result of the SQL function LENGTH inserted into it. class MyModel < ActiveRecord::Base sql_column :size_of_another_column, "LENGTH", :another_column end Example 2: You have a model with three columns, position, latitude and longitude. Latitude and longitude are values expressed as angles, and position is a special datatype for your database that represents the X/Y/Z projection of that particular latitude and longitude (example: http://www.postgresql.org/docs/8.3/static/earthdistance.html ) When you insert data with latitude and longitude, you want to automatically call a function in your database to transform the latitude and longitude into the appropriate represenation. class MyModel < ActiveRecord::Base sql_column :position, "ll_to_earth", :latitude, :longitude end Example 3: You are an insane criminal who has somehow learned SQL. You would like to make anyone who runs your code to suffer database punishing queries and odd security and data formatting issues that will make them rue the day they ever learned of computers. class MyModel < ActiveRecord::Base sql_column :a_column, "(SELECT count(id) FROM large_list_of_things)", :raw => true sql_column :another_column, '(SELECT count(other_id) FROM other_large_list_of_things WHERE some_column = \'#{some_model_method}\')', :raw => true end == Notes No tests yet, am lazy. == Copyright Copyright (c) 2009 Chris Zelenak. See LICENSE for details.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.