Name Description Size
Collection.sys.mjs @namespace Central registry and logic for all collections. The collection manager is a singleton that has the following tasks: - Let views of objects (nouns) know when their objects have changed. For example, an attribute has changed due to user action. - Let views of objects based on queries know when new objects match their query, or when their existing objects no longer match due to changes. - Caching/object-identity maintenance. It is ideal if we only ever have one instance of an object at a time. (More specifically, only one instance per database row 'id'.) The collection mechanism lets us find existing instances to this end. Caching can be directly integrated by being treated as a special collection. 26681
Everybody.sys.mjs eslint-disable import/no-unassigned-import 801
Facet.sys.mjs This file provides faceting logic. 17474
Gloda.sys.mjs @see |Gloda.BadItemContentsError| 85028
GlodaConstants.sys.mjs The constants used by Gloda files. Avoid importing anything into this file. 10110
GlodaContent.sys.mjs Given a MimeMsg and the corresponding folder, return the GlodaContent object. @param aMimeMsg: the MimeMessage instance @param folder: the nsIMsgDBFolder @returns an array containing the GlodaContent instance, and the meta dictionary that the Gloda content providers may have filled with useful data. 8009
GlodaDatabind.sys.mjs Perform appropriate binding coercion based on the schema provided to us. Although we end up effectively coercing JS Date objects to numeric values, we should not be provided with JS Date objects! There is no way for us to know to turn them back into JS Date objects on the way out. Additionally, there is the small matter of storage's bias towards PRTime representations which may not always be desirable. 6974
GlodaDataModel.sys.mjs @class Represents a gloda attribute definition's DB form. This class stores the information in the database relating to this attribute definition. Access its attrDef attribute to get at the really juicy data. This main interesting thing this class does is serve as the keeper of the mapping from parameters to attribute ids in the database if this is a parameterized attribute. 26703
GlodaDatastore.sys.mjs This file looks to Myk Melez <myk@mozilla.org>'s Mozilla Labs snowl project's (https://hg.mozilla.org/labs/snowl/) modules/GlodaDatastore.sys.mjs for inspiration and idioms (and also a name :). 154212
GlodaExplicitAttr.sys.mjs This file provides the "explicit attribute" provider for messages. It is concerned with attributes that are the result of user actions. For example, whether a message is starred (flagged), message tags, whether it is read/unread, etc. 5820
GlodaFundAttr.sys.mjs @namespace The Gloda Fundamental Attribute provider is a special attribute provider; it provides attributes that the rest of the providers should be able to assume exist. Also, it may end up accessing things at a lower level than most extension providers should do. In summary, don't mimic this code unless you won't complain when your code breaks. 33663
GlodaIndexer.sys.mjs This file currently contains a fairly general implementation of asynchronous indexing with a very explicit message indexing implementation. As gloda will eventually want to index more than just messages, the message-specific things should ideally lose their special hold on this file. This will benefit readability/size as well. 53284
GlodaMsgIndexer.sys.mjs Contacts ***** 9732
GlodaMsgSearcher.sys.mjs How much time boost should a 'score point' amount to? The authoritative, incontrivertible answer, across all time and space, is a week. Note that gloda stores timestamps as PRTimes for no exceedingly good reason. 12460
GlodaPublic.sys.mjs eslint-disable-next-line import/no-unassigned-import 1425
GlodaQueryClassFactory.sys.mjs @class Query class core; each noun gets its own sub-class where attributes have helper methods bound. @param aOptions A dictionary of options. Current legal options are: - noMagic: Indicates that the noun's dbQueryJoinMagic should be ignored. Currently, this means that messages will not have their full-text indexed values re-attached. This is planned to be offset by having queries/cache lookups that do not request noMagic to ensure that their data does get loaded. - explicitSQL: A hand-rolled alternate representation for the core SELECT portion of the SQL query. The queryFromQuery logic still generates its normal query, we just ignore its result in favor of your provided value. This means that the positional parameter list is still built and you should/must rely on those bound parameters (using '?'). The replacement occurs prior to the outerWrapColumns, ORDER BY, and LIMIT contributions to the query. - outerWrapColumns: If provided, wraps the query in a "SELECT *,blah FROM (actual query)" where blah is your list of outerWrapColumns made comma-delimited. The idea is that this allows you to reference the result of expressions inside the query using their names rather than having to duplicate the logic. In practice, this makes things more readable but is unlikely to improve performance. (Namely, my use of 'offsets' for full-text stuff ends up in the EXPLAIN plan twice despite this.) - noDbQueryValidityConstraints: Indicates that any validity constraints should be ignored. This should be used when you need to get every match regardless of whether it's valid. @property _owner The query instance that holds the list of unions... @property _constraints A list of (lists of OR constraints) that are ANDed together. For example [[FROM bob, FROM jim], [DATE last week]] would be requesting us to find all the messages from either bob or jim, and sent in the last week. @property _unions A list of other queries whose results are unioned with our own. There is no concept of nesting or sub-queries apart from this mechanism. 23580
GlodaSyntheticView.sys.mjs This file is charged with providing you a way to have a pretty gloda-backed nsIMsgDBView. 4929
GlodaUtils.sys.mjs @namespace A holding place for logic that is not gloda-specific and should reside elsewhere. 2639
IndexMsg.sys.mjs This file currently contains a fairly general implementation of asynchronous indexing with a very explicit message indexing implementation. As gloda will eventually want to index more than just messages, the message-specific things should ideally lose their special hold on this file. This will benefit readability/size as well. 138522
MimeMessage.sys.mjs Maintain a list of all active stream listeners so that we can cancel them all during shutdown. If we don't cancel them, we risk calls into javascript from C++ after the various XPConnect contexts have already begun their teardown process. 26252
moz.build 931
NounFreetag.sys.mjs @namespace Tag noun provider. Since the tag unique value is stored as a parameter, we are an odd case and semantically confused. 1977
NounMimetype.sys.mjs Input data structure to allow us to build a fast mapping from mime type to category name. The keys in MimeCategoryMapping are the top-level categories. Each value can either be a list of MIME types or a nested object which recursively defines sub-categories. We currently do not use the sub-categories. They are just there to try and organize the MIME types a little and open the door to future enhancements. Do _not_ add additional top-level categories unless you have added corresponding entries to gloda.properties under the "gloda.mimetype.category" branch and are making sure localizers are aware of the change and have time to localize it. Entries with wildcards in them are part of a fallback strategy by the |mimeTypeNoun| and do not actually use regular expressions or anything like that. Everything is a straight string lookup. Given "foo/bar" we look for "foo/bar", then "foo/*", and finally "*". 18351
NounTag.sys.mjs @namespace Tag noun provider. 2377
SuffixTree.sys.mjs Given a list of strings and a corresponding map of items that those strings correspond to, build a suffix tree. 11172