Method: Cequel::Record::RecordSet#first

Defined in:
lib/cequel/record/record_set.rb

#firstRecord #first(count) ⇒ Array

Overloads:

  • #firstRecord

    Returns the first record in this record set.

    Returns:

    • (Record)

      the first record in this record set

  • #first(count) ⇒ Array

    Returns the first ‘count` records of the record set.

    Parameters:

    • count (Integer)

      how many records to return

    Returns:

    • (Array)

      the first ‘count` records of the record set

Returns:

Since:

  • 1.0.0



466
467
468
# File 'lib/cequel/record/record_set.rb', line 466

def first(count = nil)
  count ? limit(count).entries : limit(1).each.first
end