Module: DBI::SQL
- Defined in:
- lib/dbi/sql.rb,
lib/dbi/sql/preparedstatement.rb
Overview
the SQL package contains assistance for DBDs and generally will not be needed outside of them.
Defined Under Namespace
Classes: PreparedStatement
Class Method Summary collapse
-
.query?(sql) ⇒ Boolean
Helper to determine if the statement is a query.
Class Method Details
.query?(sql) ⇒ Boolean
Helper to determine if the statement is a query. Very crude and should not be relied on for accuracy.
16 17 18 |
# File 'lib/dbi/sql.rb', line 16 def self.query?(sql) sql =~ /^\s*select\b/i end |