OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 case SQLITE_IOERR_SHMLOCK: | 66 case SQLITE_IOERR_SHMLOCK: |
67 case SQLITE_LOCKED_SHAREDCACHE: | 67 case SQLITE_LOCKED_SHAREDCACHE: |
68 case SQLITE_BUSY_RECOVERY: | 68 case SQLITE_BUSY_RECOVERY: |
69 case SQLITE_CANTOPEN_NOTEMPDIR: | 69 case SQLITE_CANTOPEN_NOTEMPDIR: |
70 return error; | 70 return error; |
71 default: | 71 default: |
72 return (error & 0xff); | 72 return (error & 0xff); |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
76 } | 76 } // namespace |
77 | 77 |
78 namespace blink { | 78 namespace blink { |
79 | 79 |
80 SQLiteStatement::SQLiteStatement(SQLiteDatabase& db, const String& sql) | 80 SQLiteStatement::SQLiteStatement(SQLiteDatabase& db, const String& sql) |
81 : m_database(db) | 81 : m_database(db) |
82 , m_query(sql) | 82 , m_query(sql) |
83 , m_statement(0) | 83 , m_statement(0) |
84 #if ENABLE(ASSERT) | 84 #if ENABLE(ASSERT) |
85 , m_isPrepared(false) | 85 , m_isPrepared(false) |
86 #endif | 86 #endif |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 ASSERT(col >= 0); | 307 ASSERT(col >= 0); |
308 if (!m_statement) | 308 if (!m_statement) |
309 if (prepareAndStep() != SQLITE_ROW) | 309 if (prepareAndStep() != SQLITE_ROW) |
310 return 0; | 310 return 0; |
311 if (columnCount() <= col) | 311 if (columnCount() <= col) |
312 return 0; | 312 return 0; |
313 return sqlite3_column_int64(m_statement, col); | 313 return sqlite3_column_int64(m_statement, col); |
314 } | 314 } |
315 | 315 |
316 } // namespace blink | 316 } // namespace blink |
OLD | NEW |