News for hackers. Stuff that matters.
Re:Hood: A transactional, database-agnostic ORM for Go by sunfmin on Monday December 17, 2012 @04:23AM (#4931522)
I actually want to see this:

    hd.Where("name = ?", name).Where("category = ?", category)

So that you can do conditional where easily, for example:

    hd = hd.Where("name = ?", name)
    if category != "" {
        hd = hd.Where("category = ?", category)
    }
But It doesn't seem to support this?
Re:Hood: A transactional, database-agnostic ORM for Go by eaigner on Monday December 17, 2012 @07:09AM (#4931958)
As for now, you have to specify the complete where clause

    hd.Where("name = ? AND category = ?", name, category)
but it should be quite trivial to add the chaining you pointed out.
Re:Hood: A transactional, database-agnostic ORM for Go by eaigner on Monday December 17, 2012 @07:35AM (#4932026)