OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2013 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 24 matching lines...) Expand all Loading... |
35 #include "wtf/Vector.h" | 35 #include "wtf/Vector.h" |
36 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 class AbstractSQLStatement; | 40 class AbstractSQLStatement; |
41 class DatabaseBackend; | 41 class DatabaseBackend; |
42 class SQLError; | 42 class SQLError; |
43 class SQLTransactionBackend; | 43 class SQLTransactionBackend; |
44 | 44 |
45 class SQLStatementBackend : public AbstractSQLStatementBackend { | 45 class SQLStatementBackend FINAL : public AbstractSQLStatementBackend { |
46 public: | 46 public: |
47 static PassRefPtr<SQLStatementBackend> create(PassOwnPtr<AbstractSQLStatemen
t>, | 47 static PassRefPtr<SQLStatementBackend> create(PassOwnPtr<AbstractSQLStatemen
t>, |
48 const String& sqlStatement, const Vector<SQLValue>& arguments, int permi
ssions); | 48 const String& sqlStatement, const Vector<SQLValue>& arguments, int permi
ssions); |
49 | 49 |
50 bool execute(DatabaseBackend*); | 50 bool execute(DatabaseBackend*); |
51 bool lastExecutionFailedDueToQuota() const; | 51 bool lastExecutionFailedDueToQuota() const; |
52 | 52 |
53 bool hasStatementCallback() const { return m_hasCallback; } | 53 bool hasStatementCallback() const { return m_hasCallback; } |
54 bool hasStatementErrorCallback() const { return m_hasErrorCallback; } | 54 bool hasStatementErrorCallback() const { return m_hasErrorCallback; } |
55 | 55 |
56 void setVersionMismatchedError(DatabaseBackend*); | 56 void setVersionMismatchedError(DatabaseBackend*); |
57 | 57 |
58 AbstractSQLStatement* frontend(); | 58 AbstractSQLStatement* frontend(); |
59 virtual PassRefPtr<SQLError> sqlError() const; | 59 virtual PassRefPtr<SQLError> sqlError() const OVERRIDE; |
60 virtual PassRefPtr<SQLResultSet> sqlResultSet() const; | 60 virtual PassRefPtr<SQLResultSet> sqlResultSet() const OVERRIDE; |
61 | 61 |
62 private: | 62 private: |
63 SQLStatementBackend(PassOwnPtr<AbstractSQLStatement>, const String& statemen
t, | 63 SQLStatementBackend(PassOwnPtr<AbstractSQLStatement>, const String& statemen
t, |
64 const Vector<SQLValue>& arguments, int permissions); | 64 const Vector<SQLValue>& arguments, int permissions); |
65 | 65 |
66 void setFailureDueToQuota(DatabaseBackend*); | 66 void setFailureDueToQuota(DatabaseBackend*); |
67 void clearFailureDueToQuota(); | 67 void clearFailureDueToQuota(); |
68 | 68 |
69 OwnPtr<AbstractSQLStatement> m_frontend; | 69 OwnPtr<AbstractSQLStatement> m_frontend; |
70 String m_statement; | 70 String m_statement; |
71 Vector<SQLValue> m_arguments; | 71 Vector<SQLValue> m_arguments; |
72 bool m_hasCallback; | 72 bool m_hasCallback; |
73 bool m_hasErrorCallback; | 73 bool m_hasErrorCallback; |
74 | 74 |
75 RefPtr<SQLError> m_error; | 75 RefPtr<SQLError> m_error; |
76 RefPtr<SQLResultSet> m_resultSet; | 76 RefPtr<SQLResultSet> m_resultSet; |
77 | 77 |
78 int m_permissions; | 78 int m_permissions; |
79 }; | 79 }; |
80 | 80 |
81 } // namespace WebCore | 81 } // namespace WebCore |
82 | 82 |
83 #endif // SQLStatementBackend_h | 83 #endif // SQLStatementBackend_h |
OLD | NEW |