michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ : michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozStorageRow_h michael@0: #define mozStorageRow_h michael@0: michael@0: #include "mozIStorageRow.h" michael@0: #include "nsCOMArray.h" michael@0: #include "nsDataHashtable.h" michael@0: #include "mozilla/Attributes.h" michael@0: class nsIVariant; michael@0: struct sqlite3_stmt; michael@0: michael@0: namespace mozilla { michael@0: namespace storage { michael@0: michael@0: class Row MOZ_FINAL : public mozIStorageRow michael@0: { michael@0: public: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_MOZISTORAGEROW michael@0: NS_DECL_MOZISTORAGEVALUEARRAY michael@0: michael@0: /** michael@0: * Initializes the object with the given statement. Copies the values from michael@0: * the statement. michael@0: * michael@0: * @param aStatement michael@0: * The sqlite statement to pull results from. michael@0: */ michael@0: nsresult initialize(sqlite3_stmt *aStatement); michael@0: michael@0: private: michael@0: /** michael@0: * The number of columns in this tuple. michael@0: */ michael@0: uint32_t mNumCols; michael@0: michael@0: /** michael@0: * Stores the data in the tuple. michael@0: */ michael@0: nsCOMArray mData; michael@0: michael@0: /** michael@0: * Maps a given name to a column index. michael@0: */ michael@0: nsDataHashtable mNameHashtable; michael@0: }; michael@0: michael@0: } // namespace storage michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozStorageRow_h