@example Request syntax with placeholder values

   dynamo_db.tables()
 @param [Hash] options ({})
 @return [Table::Collection]
421519
def tables(options = {})
      batches = Enumerator.new do |y|
        resp = @client.list_tables(options)
        resp.each_page do |page|
          batch = []
          page.data.table_names.each do |t|
            batch << Table.new(
              name: t,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      Table::Collection.new(batches)
    end
736481
def options
      Hash[*Vault::Configurable.keys.map do |key|
        [key, instance_variable_get(:"@#{key}")]
      end.flatten]
    end
377699
def table_gsis(table_name):
    
    try:
        desc = DYNAMODB_CONNECTION.describe_table(table_name)[u'Table']
    except JSONResponseError:
        raise

    if u'GlobalSecondaryIndexes' in desc:
        return desc[u'GlobalSecondaryIndexes']

    return []
311496
def as_json(_options = {})
      hash = {}
      instance_variables.each do |var|
        name = var[1..-1]

        if name =~ /^__/
          # if a variable starts with double underscore, strip one off
          name = name[1..-1]
        elsif name =~ /^_/
          # Hide variables that start with single underscore
          name = nil
        end

        hash[name] = instance_variable_get(var) if name
      end
      hash
    end
302166
def filter!(keys, params, options={:recursive => true})  # :nodoc:
      case params
      when Hash, ParamsHash
        params.keys.each do |k, v|
          unless (keys.include?(k) or Github::Validations::VALID_API_KEYS.include?(k))
            params.delete(k)
          else
            filter!(keys, params[k]) if options[:recursive]
          end
        end
      when Array
        params.map! do |el|
          filter!(keys, el) if options[:recursive]
        end
      else
        params
      end
      return params
    end
180073
def add_table(ref, options={})
      tables << Table.new(ref, self, options)
      yield tables.last if block_given?
      tables.last
    end
236585
def save(_options = {})
      self.class.create_table

      if new_record?
        conditions = { unless_exists: [self.class.hash_key] }
        conditions[:unless_exists] << range_key if range_key

        run_callbacks(:create) { persist(conditions) }
      else
        persist
      end
    end
607776
def index(options = {})
      options[:query] ||= []
      @page = (params[:page] || 1).to_i
      @route_name ||= @controller_name ||= controller_name

      @iterator = CEO::Iterator.new(
        thing,
        query: options[:query],
        current_page: @page,
        per_page: options.fetch(:per_page, 20),
        filters: {
          only: options[:only],
          except: options[:except]
        }
      )

      @things = @iterator.all || []
      @total_pages = @iterator.total_pages

      @model_name ||= thing.to_s.underscore
      @human_model = @model_name.humanize
      @title = thing.to_s.titleize.pluralize
      render 'admin/index'
    end
1222716
def results
      ActiveRecord::Base.connection.tables.each do |table|
        model = table.classify.constantize rescue next

        model.columns.each do |column|
          present = model.respond_to?(:nillify_attributes) && model.nillify_attributes.include?(column.name.to_sym)

          @results << [present, model.name, column.name] if include_column(column)
        end
      end

      @results
    end
1187427
def access_keys(options = {})
      batches = Enumerator.new do |y|
        options = options.merge(user_name: @name)
        resp = @client.list_access_keys(options)
        resp.each_page do |page|
          batch = []
          page.data.access_key_metadata.each do |a|
            batch << AccessKey.new(
              user_name: @name,
              id: a.access_key_id,
              data: a,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      AccessKey::Collection.new(batches)
    end
149012
def _doQueryHash( doQueryOptions )
     doQueryOptions ||= {}
     raise "options must be a Hash" unless doQueryOptions.is_a?(Hash)
     doQueryOptions["dbid"] ||= @dbid
     doQueryOptions["fmt"] ||= "structured"
     doQuery( doQueryOptions["dbid"], 
                   doQueryOptions["query"],
                   doQueryOptions["qid"], 
                   doQueryOptions["qname"], 
                   doQueryOptions["clist"], 
                   doQueryOptions["slist"], 
                   doQueryOptions["fmt"], 
                   doQueryOptions["options"] )
   end
976330
def parse_options
		newOptions = nil
		@options.each do |key, value|
			if key.downcase.to_s.eql? "timeseries"
				@timeSeriesData = value.GetDataStore()
				@timeSeriesSource = value.GetDataSource()
				newOptions = {}			
				newOptions['dataSource'] = "__DataSource__"
				@options.delete(key)
			end
		end
		if newOptions
			@options.merge!(newOptions)			
		end
		
        keys = @options.keys
        keys.each{ |k| instance_variable_set "@#{k}".to_sym, @options[k] if self.respond_to? k }
        #parse_datasource_json
      end
622620
function Table(name, db, options) {
  this.name = name;
  this.db = db; // the name of the database
  this.options = options || {};
  this.options.primaryKey = this.options.primary_key || "id";
  this.documents = {};
  this.indexes = {}; // String -> FUNC terms
  this.indexes[this.options.primaryKey] = {
    //TODO Make me use TERMS
    //fn: function(doc) { return doc[name] },
    // 69=FUNC, 2=MAKE_ARRAY, 31=GET_FIELD, 10=VAR, 1=ARGUMENT_INDEX
    //TODO Use a uuid to avoid collision
    fn: [ 69, [ [ 2, [ 1 ] ], [ 31, [ [ 10, [ 1 ] ], this.options.primaryKey ] ] ] ],
    function: { /* TODO */ },
    geo: false,
    outdated: false,
    ready: true,
    multi: false
  };
  this.id = util.uuid();
  if (options.meta === true) {
    // meta table
    this.meta = true;
  }
}
96225
function fetchCollection(collection, options) {
	options || ( options = {} );

	var request,
		deferred = new _.Deferred(),
		// Determine the type of request: Query or Scan. Default is Scan.
		fetchType = options.query ? 'query' : 'scan',
		params = { TableName: collection._tableName() };

	wrapComplete( collection, options );
	_.extend( params, options[ fetchType ], options.dynamodb );

	// Create the Query or Scan request
	request = dynamo()[ fetchType ]( params );

	request.on('complete', function (response) {
		var dummyModel,
			ctx = options.context || collection;

		if ( response.error ) {
			deferred.rejectWith( ctx, [ response, options ] );
		} else {
			/**
			 * Backbone's "internal" success callback takes an array of models/objects as the first argument.
			 * Make the entire AWS `response` available as `options.awsResponse`.
			 * `Date` attributes are deserialized here.
			 */
			options.awsResponse = response;
			dummyModel = new collection.model();
			_.each(response.data.Items, function (item) {
				deserializeAllDates( dummyModel, item );
			});
			deferred.resolveWith( ctx, [ response.data.Items, options ] );
		}
	});
	request.send();

	deferred.done( options.success ).fail( options.error ).always( options.complete );

	return deferred.promise( request );
}
570463
def optional_parameters
      definition_lambda.parameters.select { |key,_value| key == :key }.map { |_key,value| value }
    end
622774
def getTableIDs(dbid)
      tableIDs = []
      dbid ||= @dbid
      getSchema(dbid)      
      if @chdbids
         chdbidArray = findElementsByAttributeName( @chdbids, "name" )
         chdbidArray.each{ |chdbid|
            if chdbid.has_text?
               tableIDs << chdbid.text
            end
         }
      end
      tableIDs
    end
935280
public static function GetTables ($forced_obtain = false, $options = []) {
		$options += $options + static::GetDefaultOptions();
		return DBI::GetTables($options, static::GetName(), $forced_obtain);
	}