Method: Sequel::Database#create_table_sql_list
- Defined in:
- lib/sequel/database/schema_sql.rb
#create_table_sql_list(name, columns, indexes = nil, options = {}) ⇒ Object
Array of SQL DDL statements, the first for creating a table with the given name and column specifications, and the others for specifying indexes on the table.
116 117 118 119 120 |
# File 'lib/sequel/database/schema_sql.rb', line 116 def create_table_sql_list(name, columns, indexes = nil, = {}) sql = ["CREATE TABLE #{quote_schema_table(name)} (#{column_list_sql(columns)})"] sql.concat(index_list_sql_list(name, indexes)) if indexes && !indexes.empty? sql end |