You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Dominic Tarr <do...@gmail.com> on 2011/09/23 16:34:36 UTC

versioning views

hi,

last time I did some couch db development,
I ran into some difficulties managing view versions.

so what I was thinking was, that this time i'll write a tool to manage their
versions.

basically, i'll save all the views with an id like: _design/whatever_v1.3.5

then, in my server code (which will be nodejs)

view ('whatever', '~1.2', 'all', function (err, data) {
...
})

when I start my server, it will request all views from the server,
decide which which is the latest view that matches a stated range, and use
that.

does this sound like a good idea, or am I mad?

see also:

http://semver.org

https://github.com/isaacs/node-semver

cheers, Dominic

Re: versioning views

Posted by Dominic Tarr <do...@gmail.com>.
I think this will mainly be an advantage during development.

On Sat, Sep 24, 2011 at 2:34 AM, Mark Hahn <ma...@boutiquing.com> wrote:

> The views for my app have to match the version of my app so I maintain them
> the same as I do any other source code.  Whenever I release I have a
> utility
> to push them to the db.
>
> On Fri, Sep 23, 2011 at 7:34 AM, Dominic Tarr <dominic.tarr@gmail.com
> >wrote:
>
> > hi,
> >
> > last time I did some couch db development,
> > I ran into some difficulties managing view versions.
> >
> > so what I was thinking was, that this time i'll write a tool to manage
> > their
> > versions.
> >
> > basically, i'll save all the views with an id like:
> _design/whatever_v1.3.5
> >
> > then, in my server code (which will be nodejs)
> >
> > view ('whatever', '~1.2', 'all', function (err, data) {
> > ...
> > })
> >
> > when I start my server, it will request all views from the server,
> > decide which which is the latest view that matches a stated range, and
> use
> > that.
> >
> > does this sound like a good idea, or am I mad?
> >
> > see also:
> >
> > http://semver.org
> >
> > https://github.com/isaacs/node-semver
> >
> > cheers, Dominic
> >
>

Re: versioning views

Posted by Mark Hahn <ma...@boutiquing.com>.
The views for my app have to match the version of my app so I maintain them
the same as I do any other source code.  Whenever I release I have a utility
to push them to the db.

On Fri, Sep 23, 2011 at 7:34 AM, Dominic Tarr <do...@gmail.com>wrote:

> hi,
>
> last time I did some couch db development,
> I ran into some difficulties managing view versions.
>
> so what I was thinking was, that this time i'll write a tool to manage
> their
> versions.
>
> basically, i'll save all the views with an id like: _design/whatever_v1.3.5
>
> then, in my server code (which will be nodejs)
>
> view ('whatever', '~1.2', 'all', function (err, data) {
> ...
> })
>
> when I start my server, it will request all views from the server,
> decide which which is the latest view that matches a stated range, and use
> that.
>
> does this sound like a good idea, or am I mad?
>
> see also:
>
> http://semver.org
>
> https://github.com/isaacs/node-semver
>
> cheers, Dominic
>