Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: Source/modules/webdatabase/SQLResultSet.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 29 matching lines...) Expand all
40 , m_insertId(0) 40 , m_insertId(0)
41 , m_insertIdSet(false) 41 , m_insertIdSet(false)
42 , m_rowsAffected(0) 42 , m_rowsAffected(0)
43 { 43 {
44 ScriptWrappable::init(this); 44 ScriptWrappable::init(this);
45 } 45 }
46 46
47 int64_t SQLResultSet::insertId(ExceptionCode& e) const 47 int64_t SQLResultSet::insertId(ExceptionCode& e) const
48 { 48 {
49 // 4.11.4 - Return the id of the last row inserted as a result of the query 49 // 4.11.4 - Return the id of the last row inserted as a result of the query
50 // If the query didn't result in any rows being added, raise an INVALID_ACCE SS_ERR exception 50 // If the query didn't result in any rows being added, raise an InvalidAcces sError exception
51 if (m_insertIdSet) 51 if (m_insertIdSet)
52 return m_insertId; 52 return m_insertId;
53 53
54 e = INVALID_ACCESS_ERR; 54 e = InvalidAccessError;
55 return -1; 55 return -1;
56 } 56 }
57 57
58 int SQLResultSet::rowsAffected() const 58 int SQLResultSet::rowsAffected() const
59 { 59 {
60 return m_rowsAffected; 60 return m_rowsAffected;
61 } 61 }
62 62
63 SQLResultSetRowList* SQLResultSet::rows() const 63 SQLResultSetRowList* SQLResultSet::rows() const
64 { 64 {
65 return m_rows.get(); 65 return m_rows.get();
66 } 66 }
67 67
68 void SQLResultSet::setInsertId(int64_t id) 68 void SQLResultSet::setInsertId(int64_t id)
69 { 69 {
70 ASSERT(!m_insertIdSet); 70 ASSERT(!m_insertIdSet);
71 71
72 m_insertId = id; 72 m_insertId = id;
73 m_insertIdSet = true; 73 m_insertIdSet = true;
74 } 74 }
75 75
76 void SQLResultSet::setRowsAffected(int count) 76 void SQLResultSet::setRowsAffected(int count)
77 { 77 {
78 m_rowsAffected = count; 78 m_rowsAffected = count;
79 } 79 }
80 80
81 } 81 }
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/DatabaseManager.cpp ('k') | Source/modules/webdatabase/SQLTransaction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698