OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #ifndef SQLResultSetRowList_h | 29 #ifndef SQLResultSetRowList_h |
30 #define SQLResultSetRowList_h | 30 #define SQLResultSetRowList_h |
31 | 31 |
32 #include "bindings/core/v8/ScriptWrappable.h" | 32 #include "bindings/core/v8/ScriptWrappable.h" |
33 #include "modules/webdatabase/sqlite/SQLValue.h" | 33 #include "modules/webdatabase/sqlite/SQLValue.h" |
34 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
35 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
| 38 class ScriptValue; |
| 39 class ExceptionState; |
38 | 40 |
39 class SQLResultSetRowList : public GarbageCollectedFinalized<SQLResultSetRowList
>, public ScriptWrappable { | 41 class SQLResultSetRowList : public GarbageCollectedFinalized<SQLResultSetRowList
>, public ScriptWrappable { |
40 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
41 public: | 43 public: |
42 static SQLResultSetRowList* create() { return new SQLResultSetRowList; } | 44 static SQLResultSetRowList* create() { return new SQLResultSetRowList; } |
43 DEFINE_INLINE_TRACE() { } | 45 DEFINE_INLINE_TRACE() { } |
44 | 46 |
45 const Vector<String>& columnNames() const { return m_columns; } | 47 const Vector<String>& columnNames() const { return m_columns; } |
46 const Vector<SQLValue>& values() const { return m_result; } | 48 const Vector<SQLValue>& values() const { return m_result; } |
47 | 49 |
48 void addColumn(const String& name) { m_columns.append(name); } | 50 void addColumn(const String& name) { m_columns.append(name); } |
49 void addResult(const SQLValue& result) { m_result.append(result); } | 51 void addResult(const SQLValue& result) { m_result.append(result); } |
50 | 52 |
51 unsigned length() const; | 53 unsigned length() const; |
| 54 ScriptValue item(unsigned index, ExceptionState&); |
52 | 55 |
53 private: | 56 private: |
54 SQLResultSetRowList() { } | 57 SQLResultSetRowList() { } |
55 | 58 |
56 Vector<String> m_columns; | 59 Vector<String> m_columns; |
57 Vector<SQLValue> m_result; | 60 Vector<SQLValue> m_result; |
58 }; | 61 }; |
59 | 62 |
60 } // namespace blink | 63 } // namespace blink |
61 | 64 |
62 #endif // SQLResultSetRowList_h | 65 #endif // SQLResultSetRowList_h |
OLD | NEW |