Class Sequel::Mock::Dataset
In: lib/sequel/adapters/mock.rb
Parent: Sequel::Dataset

Methods

Public Instance methods

The fetch setting for this dataset, if it has been overridden

[Source]

     # File lib/sequel/adapters/mock.rb, line 318
318:       def _fetch
319:         cache_get(:_fetch) || @opts[:fetch]
320:       end

The autoid setting for this dataset, if it has been overridden

[Source]

     # File lib/sequel/adapters/mock.rb, line 313
313:       def autoid
314:         cache_get(:_autoid) || @opts[:autoid]
315:       end

If arguments are provided, use them to set the columns for this dataset and return self. Otherwise, use the default Sequel behavior and return the columns.

[Source]

     # File lib/sequel/adapters/mock.rb, line 330
330:       def columns(*cs)
331:         if cs.empty?
332:           super
333:         else
334:           self.columns = cs
335:           self
336:         end
337:       end

[Source]

     # File lib/sequel/adapters/mock.rb, line 339
339:       def fetch_rows(sql, &block)
340:         execute(sql, &block)
341:       end

The numrows setting for this dataset, if it has been overridden

[Source]

     # File lib/sequel/adapters/mock.rb, line 323
323:       def numrows
324:         cache_get(:_numrows) || @opts[:numrows]
325:       end

[Source]

     # File lib/sequel/adapters/mock.rb, line 343
343:       def quote_identifiers?
344:         @opts.fetch(:quote_identifiers, db.send(:quote_identifiers_default))
345:       end

Return cloned dataset with the autoid setting modified

[Source]

     # File lib/sequel/adapters/mock.rb, line 348
348:       def with_autoid(autoid)
349:         clone(:autoid=>autoid)
350:       end

Return cloned dataset with the fetch setting modified

[Source]

     # File lib/sequel/adapters/mock.rb, line 353
353:       def with_fetch(fetch)
354:         clone(:fetch=>fetch)
355:       end

Return cloned dataset with the numrows setting modified

[Source]

     # File lib/sequel/adapters/mock.rb, line 358
358:       def with_numrows(numrows)
359:         clone(:numrows=>numrows)
360:       end

[Validate]