From: Adrien Bustany <adrien@bustany.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 5/7] go: Partially bind notmuch_database_upgrade
Date: Wed, 18 Jul 2012 21:34:33 +0300 [thread overview]
Message-ID: <1342636475-16057-6-git-send-email-adrien@bustany.org> (raw)
In-Reply-To: <1342636475-16057-1-git-send-email-adrien@bustany.org>
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;
+}
/* Retrieve a directory object from the database for 'path'.
*
--
1.7.7.6
next prev parent reply other threads:[~2012-07-18 18:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 18:34 [PATCH 0/7] Various fixes for the Go bindings Adrien Bustany
2012-07-18 18:34 ` [PATCH 1/7] go: Use iota in enum bindings Adrien Bustany
2012-07-18 20:17 ` Austin Clements
2012-07-18 20:36 ` Sebastien Binet
2012-07-18 18:34 ` [PATCH 2/7] go: Add missing MESSAGE_FLAG_EXCLUDED in Flag enum Adrien Bustany
2012-07-18 18:34 ` [PATCH 3/7] go: Allow notmuch objects to be garbage collected Adrien Bustany
2012-07-18 20:40 ` Austin Clements
2012-07-19 18:25 ` Adrien Bustany
2012-07-20 3:23 ` Austin Clements
2012-07-23 22:03 ` Adrien Bustany
2012-08-04 19:28 ` Austin Clements
2012-10-19 3:55 ` Ethan Glasser-Camp
2012-10-25 18:41 ` Adrien Bustany
2012-07-18 18:34 ` [PATCH 4/7] go: Make Destroy functions safe to call several times Adrien Bustany
2012-07-18 18:34 ` Adrien Bustany [this message]
2012-07-18 20:41 ` [PATCH 5/7] go: Partially bind notmuch_database_upgrade Austin Clements
2012-07-18 18:34 ` [PATCH 6/7] go: Bind notmuch_database_find_message_by_filename Adrien Bustany
2012-07-18 18:34 ` [PATCH 7/7] go: Bind notmuch_thread_t functions Adrien Bustany
2012-07-18 20:50 ` Austin Clements
2012-07-18 20:51 ` [PATCH 0/7] Various fixes for the Go bindings Austin Clements
2012-07-19 18:29 ` Adrien Bustany
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342636475-16057-6-git-send-email-adrien@bustany.org \
--to=adrien@bustany.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).