lib/dynamoid/adapter/aws_sdk.rb
# Create a table on DynamoDB. This usually takes a long time to complete.
#
# @param [String] table_name the name of the table to create
# @param [Symbol] key the table's primary key (defaults to :id)
# @param [Hash] options provide a range_key here if you want one for the table
#
# @since 0.2.0
Create a table on DynamoDB. This usually takes a long time to complete.
Create a table on DynamoDB . This usually takes a long time to complete .
def create_table(table_name, key = :id, options = {})
        Dynamoid.logger.info "Creating #{table_name} table. This could take a while."
        options[:hash_key] ||= {key.to_sym => :string}
        read_capacity = options[:read_capacity] || Dynamoid::Config.read_capacity
        write_capacity = options[:write_capacity] || Dynamoid::Config.write_capacity
        table = @@connection.tables.create(table_name, read_capacity, write_capacity, options)
        sleep 0.5 while table.status == :creating
        return table
      end
def create_table ( table_name , key = :id , options = { } ) Dynamoid . logger . info "Creating #{table_name} table. This could take a while." options [ :hash_key ] ||= { key . to_sym => :string } read_capacity = options [ :read_capacity ] || Dynamoid :: Config . read_capacity write_capacity = options [ :write_capacity ] || Dynamoid :: Config . write_capacity table = @@connection . tables . create ( table_name , read_capacity , write_capacity , options ) sleep 0.5 while table . status == :creating return table end
Create a table on DynamoDB.
Create a table on DynamoDB .
table_name
<not_specific>
key
<not_specific>
options
<not_specific>
<not_specific>
options provide a range_key here if you want one for the table
options provide a range_key here if you want one for the table
since
None