| 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 ScriptState; |
| 40 class ExceptionState; |
| 38 | 41 |
| 39 class SQLResultSetRowList : public GarbageCollectedFinalized<SQLResultSetRowList
>, public ScriptWrappable { | 42 class SQLResultSetRowList : public GarbageCollectedFinalized<SQLResultSetRowList
>, public ScriptWrappable { |
| 40 DEFINE_WRAPPERTYPEINFO(); | 43 DEFINE_WRAPPERTYPEINFO(); |
| 41 public: | 44 public: |
| 42 static SQLResultSetRowList* create() { return new SQLResultSetRowList; } | 45 static SQLResultSetRowList* create() { return new SQLResultSetRowList; } |
| 43 DEFINE_INLINE_TRACE() { } | 46 DEFINE_INLINE_TRACE() { } |
| 44 | 47 |
| 45 const Vector<String>& columnNames() const { return m_columns; } | 48 const Vector<String>& columnNames() const { return m_columns; } |
| 46 const Vector<SQLValue>& values() const { return m_result; } | 49 const Vector<SQLValue>& values() const { return m_result; } |
| 47 | 50 |
| 48 void addColumn(const String& name) { m_columns.append(name); } | 51 void addColumn(const String& name) { m_columns.append(name); } |
| 49 void addResult(const SQLValue& result) { m_result.append(result); } | 52 void addResult(const SQLValue& result) { m_result.append(result); } |
| 50 | 53 |
| 51 unsigned length() const; | 54 unsigned length() const; |
| 55 ScriptValue item(ScriptState*, unsigned index, ExceptionState&); |
| 52 | 56 |
| 53 private: | 57 private: |
| 54 SQLResultSetRowList() { } | 58 SQLResultSetRowList() { } |
| 55 | 59 |
| 56 Vector<String> m_columns; | 60 Vector<String> m_columns; |
| 57 Vector<SQLValue> m_result; | 61 Vector<SQLValue> m_result; |
| 58 }; | 62 }; |
| 59 | 63 |
| 60 } // namespace blink | 64 } // namespace blink |
| 61 | 65 |
| 62 #endif // SQLResultSetRowList_h | 66 #endif // SQLResultSetRowList_h |
| OLD | NEW |