[PATCH 5/7] go: Partially bind notmuch_database_upgrade
Austin Clements
amdragon at MIT.EDU
Wed Jul 18 13:41:52 PDT 2012
Quoth Adrien Bustany on Jul 18 at 9:34 pm:
> This binding does not handle the progress callback, but at least allows
> opening and upgrading a database if needed.
> ---
> bindings/go/src/notmuch/notmuch.go | 13 ++++++++++++-
> 1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go
> index d8b2739..384d5a5 100644
> --- a/bindings/go/src/notmuch/notmuch.go
> +++ b/bindings/go/src/notmuch/notmuch.go
> @@ -296,7 +296,18 @@ func (self *Database) NeedsUpgrade() bool {
> return true
> }
>
> -// TODO: notmuch_database_upgrade
> +// TODO: Proper notmuch_database_upgrade
> +/* Upgrade the current database.
> + *
> + * After opening a database in read-write mode, the client should
> + * check if an upgrade is needed (notmuch_database_needs_upgrade) and
> + * if so, upgrade with this function before making any modifications.
> + */
> +func (self *Database) Upgrade() Status {
> + st := Status(C.notmuch_database_upgrade(self.db, nil, nil));
> +
> + return st;
*gasp* Semicolons!
> +}
>
> /* Retrieve a directory object from the database for 'path'.
> *
More information about the notmuch
mailing list