Browse files

Minor RDoc updates in sql.rb

  • Loading branch information...
1 parent 5098c26 commit 201eb39f2b14d93f2ea143e53d68e884b29d726e @jeremyevans committed Jun 25, 2010
Showing with 15 additions and 14 deletions.
  1. +15 −14 lib/sequel/sql.rb
View
29 lib/sequel/sql.rb
@@ -668,25 +668,25 @@ class ComplexExpression
include SubscriptMethods
end
- # Represents constants or psuedo-constants (e.g. CURRENT_DATE) in SQL.
+ # Represents constants or psuedo-constants (e.g. +CURRENT_DATE+) in SQL.
class Constant < GenericExpression
- # Create an object with the given table
+ # The underlying constant related to this object.
+ attr_reader :constant
+
+ # Create an constant with the given value
def initialize(constant)
@constant = constant
end
to_s_method :constant_sql, '@constant'
end
- # Represents boolean constants such as NULL, NOTNULL, TRUE, and FALSE.
+ # Represents boolean constants such as +NULL+, +NOTNULL+, +TRUE+, and +FALSE+.
class BooleanConstant < Constant
- # The underlying constant related for this object.
- attr_reader :constant
-
to_s_method :boolean_constant_sql, '@constant'
end
- # Represents inverse boolean constants (currently only NOTNULL). A
+ # Represents inverse boolean constants (currently only +NOTNULL+). A
# special class to allow for special behavior.
class NegativeBooleanConstant < BooleanConstant
to_s_method :negative_boolean_constant_sql, '@constant'
@@ -714,7 +714,7 @@ class Function < GenericExpression
# The SQL function to call
attr_reader :f
- # Set the attributes to the given arguments
+ # Set the functions and args to the given arguments
def initialize(f, *args)
@f, @args = f, args
end
@@ -735,12 +735,12 @@ class GenericExpression
end
# Represents an identifier (column or table). Can be used
- # to specify a Symbol with multiple underscores should not be
+ # to specify a +Symbol+ with multiple underscores should not be
# split, or for creating an identifier without using a symbol.
class Identifier < GenericExpression
include QualifyingMethods
- # The table and column to reference
+ # The table or column to reference
attr_reader :value
# Set the value to the given argument
@@ -770,7 +770,7 @@ def initialize(join_type, table, table_alias = nil)
to_s_method :join_clause_sql
end
- # Represents an SQL JOIN table ON conditions clause.
+ # Represents an SQL JOIN clause with ON conditions.
class JoinOnClause < JoinClause
# The conditions for the join
attr_reader :on
@@ -785,7 +785,7 @@ def initialize(on, *args)
to_s_method :join_on_clause_sql
end
- # Represents an SQL JOIN table USING (columns) clause.
+ # Represents an SQL JOIN clause with USING conditions.
class JoinUsingClause < JoinClause
# The columns that appear in both tables that should be equal
# for the conditions to match.
@@ -803,7 +803,8 @@ def initialize(using, *args)
# Represents a literal string with placeholders and arguments.
# This is necessary to ensure delayed literalization of the arguments
- # required for the prepared statement support
+ # required for the prepared statement support and for database-specific
+ # literalization.
class PlaceholderLiteralString < Expression
# The arguments that will be subsituted into the placeholders.
# Either an array of unnamed placeholders (which will be substituted in
@@ -827,7 +828,7 @@ def initialize(str, args, parens=false)
to_s_method :placeholder_literal_string_sql
end
- # Subclass of ComplexExpression where the expression results
+ # Subclass of +ComplexExpression+ where the expression results
# in a numeric value in SQL.
class NumericExpression < ComplexExpression
include BitwiseMethods

0 comments on commit 201eb39

Please sign in to comment.