Module: Rooq
- Extended by:
- T::Sig
- Defined in:
- lib/rooq.rb,
lib/rooq/cli.rb,
lib/rooq/dsl.rb,
lib/rooq/field.rb,
lib/rooq/table.rb,
lib/rooq/result.rb,
lib/rooq/context.rb,
lib/rooq/dialect.rb,
lib/rooq/version.rb,
lib/rooq/executor.rb,
lib/rooq/condition.rb,
lib/rooq/generator.rb,
lib/rooq/connection.rb,
lib/rooq/expression.rb,
lib/rooq/dialect/base.rb,
lib/rooq/configuration.rb,
lib/rooq/query_validator.rb,
lib/rooq/dsl/delete_query.rb,
lib/rooq/dsl/insert_query.rb,
lib/rooq/dsl/select_query.rb,
lib/rooq/dsl/update_query.rb,
lib/rooq/schema_validator.rb,
lib/rooq/dialect/postgresql.rb,
lib/rooq/adapters/postgresql.rb,
lib/rooq/parameter_converter.rb,
lib/rooq/generator/introspector.rb,
lib/rooq/generator/code_generator.rb
Defined Under Namespace
Modules: Adapters, Aggregates, DSL, Dialect, Generator, WindowFunctions Classes: AliasedExpression, ArithmeticExpression, CLI, CaseExpression, CastExpression, CombinedCondition, Condition, Configuration, ConnectionPool, ConnectionProvider, Context, DefaultConnectionProvider, Error, Executor, ExecutorHooks, ExistsCondition, Expression, Field, FunctionCall, Literal, OrderSpecification, ParameterConverter, PooledConnectionProvider, QueryValidationError, QueryValidator, Result, SchemaError, SchemaValidationError, SchemaValidator, Table, TypeCoercer, ValidatingExecutor, ValidationError, WindowFrame, WindowFunction
Constant Summary collapse
- VERSION =
"1.0.1"- AnyCondition =
Type alias for any condition type
T.type_alias { T.any(Condition, CombinedCondition, ExistsCondition) }
Class Method Summary collapse
-
.case_when ⇒ CaseExpression
Helper to create CASE expressions.
- .cast(expression, as:) ⇒ CastExpression
-
.coalesce(*expressions) ⇒ FunctionCall
COALESCE function.
-
.exists(subquery) ⇒ ExistsCondition
Helper methods for conditions.
- .not_exists(subquery) ⇒ ExistsCondition
-
.nullif(expr1, expr2) ⇒ FunctionCall
NULLIF function.
Class Method Details
.case_when ⇒ CaseExpression
Helper to create CASE expressions
456 457 458 |
# File 'lib/rooq/expression.rb', line 456 def self.case_when CaseExpression.new end |
.cast(expression, as:) ⇒ CastExpression
491 492 493 |
# File 'lib/rooq/expression.rb', line 491 def self.cast(expression, as:) CastExpression.new(expression, as) end |
.coalesce(*expressions) ⇒ FunctionCall
COALESCE function
462 463 464 |
# File 'lib/rooq/expression.rb', line 462 def self.coalesce(*expressions) FunctionCall.new(:coalesce, *expressions) end |
.exists(subquery) ⇒ ExistsCondition
Helper methods for conditions
96 97 98 |
# File 'lib/rooq/condition.rb', line 96 def self.exists(subquery) ExistsCondition.new(subquery) end |
.not_exists(subquery) ⇒ ExistsCondition
101 102 103 |
# File 'lib/rooq/condition.rb', line 101 def self.not_exists(subquery) ExistsCondition.new(subquery, negated: true) end |
.nullif(expr1, expr2) ⇒ FunctionCall
NULLIF function
468 469 470 |
# File 'lib/rooq/expression.rb', line 468 def self.nullif(expr1, expr2) FunctionCall.new(:nullif, expr1, expr2) end |