Skip to content

struct Athena::ORM::Migrations::Query
inherits Struct #

A SQL statement a migration executes, with the parameters bound to it, see AORM::Migrations::AbstractMigration#add_sql.

Constructors#

.new(statement : String, parameters : Array(DB::Any) = [] of DB::Any, types : Array(String | Nil) = [] of String | ::Nil)#

Raises AORM::Migrations::Exception::InvalidArguments if there are more types than parameters.

View source

Methods#

#parameters : Array(DB::Any)#

Returns the parameters bound to the statement.

View source

#statement : String#

Returns the SQL of the statement.

View source

#to_s(io : IO) : Nil#

Same as #inspect(io).

View source

#types : Array(String | ::Nil)#

Returns the name of the AORM::Types::Type each parameter is converted through, by position. A parameter without a type is bound as is.

View source