diff options
| author | David Bremner <david@tethera.net> | 2018-11-17 10:09:00 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2019-05-25 07:08:20 -0300 |
| commit | b52cda90f0b05ce5055fb840e6d9dd88c09f1f83 (patch) | |
| tree | 18d285f1e0d1d299e0d7a80db8bae989ff6a576c /lib/database-private.h | |
| parent | 575493e78534f8fd241d663b8690a22d6885e0b1 (diff) | |
lib: cache user prefixes in database object
This will be used to avoid needing a database access to resolve a db
prefix from the corresponding UI prefix (e.g. when indexing). Arguably
the setup of the separate header map does not belong here, since it is
about indexing rather than querying, but we currently don't have any
other indexing setup to do.
Diffstat (limited to 'lib/database-private.h')
| -rw-r--r-- | lib/database-private.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/database-private.h b/lib/database-private.h index 293f2db4..9d1dabf1 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -221,6 +221,11 @@ struct _notmuch_database { Xapian::ValueRangeProcessor *value_range_processor; Xapian::ValueRangeProcessor *date_range_processor; Xapian::ValueRangeProcessor *last_mod_range_processor; + + /* XXX it's slightly gross to use two parallel string->string maps + * here, but at least they are small */ + notmuch_string_map_t *user_prefix; + notmuch_string_map_t *user_header; }; /* Prior to database version 3, features were implied by the database |
