storage/src/mozStorageRow.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #ifndef mozStorageRow_h
michael@0 8 #define mozStorageRow_h
michael@0 9
michael@0 10 #include "mozIStorageRow.h"
michael@0 11 #include "nsCOMArray.h"
michael@0 12 #include "nsDataHashtable.h"
michael@0 13 #include "mozilla/Attributes.h"
michael@0 14 class nsIVariant;
michael@0 15 struct sqlite3_stmt;
michael@0 16
michael@0 17 namespace mozilla {
michael@0 18 namespace storage {
michael@0 19
michael@0 20 class Row MOZ_FINAL : public mozIStorageRow
michael@0 21 {
michael@0 22 public:
michael@0 23 NS_DECL_THREADSAFE_ISUPPORTS
michael@0 24 NS_DECL_MOZISTORAGEROW
michael@0 25 NS_DECL_MOZISTORAGEVALUEARRAY
michael@0 26
michael@0 27 /**
michael@0 28 * Initializes the object with the given statement. Copies the values from
michael@0 29 * the statement.
michael@0 30 *
michael@0 31 * @param aStatement
michael@0 32 * The sqlite statement to pull results from.
michael@0 33 */
michael@0 34 nsresult initialize(sqlite3_stmt *aStatement);
michael@0 35
michael@0 36 private:
michael@0 37 /**
michael@0 38 * The number of columns in this tuple.
michael@0 39 */
michael@0 40 uint32_t mNumCols;
michael@0 41
michael@0 42 /**
michael@0 43 * Stores the data in the tuple.
michael@0 44 */
michael@0 45 nsCOMArray<nsIVariant> mData;
michael@0 46
michael@0 47 /**
michael@0 48 * Maps a given name to a column index.
michael@0 49 */
michael@0 50 nsDataHashtable<nsCStringHashKey, uint32_t> mNameHashtable;
michael@0 51 };
michael@0 52
michael@0 53 } // namespace storage
michael@0 54 } // namespace mozilla
michael@0 55
michael@0 56 #endif // mozStorageRow_h

mercurial