upper / db

Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
https://upper.io/
MIT License
3.54k stars 235 forks source link

No more rows in this result set for SQLite #550

Open BrendanThompson opened 4 years ago

BrendanThompson commented 4 years ago

The following code gives me back no more rows in this result set


type Entries []Entry

type Entry struct {
  Id int
  Title string
  ...
}

func ReadAll(session sqlbuilder.Database) {
    entryCollection := session.Collection(tableName)
    var entries Entries

    err := entryCollection.Find().All(&entries)
    if err != nil {
        panic(err)
    }

    for _, entry := range entries {
        fmt.Printf("%d - %s\n", entry.ID, entry.Title)
    }

}

Have played around with a few things to no avail.

xiam commented 4 years ago

Hello @BrendanThompson ,

Could you try running UPPERIO_DB_DEBUG=1 ./program and share the output?