MCPcopy Create free account
hub / github.com/upper/db / TestGetWithOffset

Method TestGetWithOffset

internal/testsuite/sql_suite.go:509–520  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

507}
508
509func (s *SQLTestSuite) TestGetWithOffset() {
510 sess := s.Session()
511
512 artist := sess.Collection("artist")
513
514 // Fetching one struct.
515 var artists []artistType
516 err := artist.Find().Offset(1).All(&artists)
517 s.NoError(err)
518
519 s.Equal(3, len(artists))
520}
521
522func (s *SQLTestSuite) TestGetResultsOneByOne() {
523 sess := s.Session()

Callers

nothing calls this directly

Calls 5

SessionMethod · 0.65
CollectionMethod · 0.65
AllMethod · 0.65
OffsetMethod · 0.65
FindMethod · 0.65

Tested by

no test coverage detected