equal
deleted
inserted
replaced
14 * You should have received a copy of the GNU General Public License |
14 * You should have received a copy of the GNU General Public License |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 */ |
16 */ |
17 |
17 |
18 #include <cstring> |
18 #include <cstring> |
|
19 |
|
20 #include <sqlite3.h> |
19 |
21 |
20 #include "PreparedStatement.h" |
22 #include "PreparedStatement.h" |
21 |
23 |
22 namespace relpipe { |
24 namespace relpipe { |
23 namespace tr { |
25 namespace tr { |
97 std::string PreparedStatement::getString(int columnIndex) { |
99 std::string PreparedStatement::getString(int columnIndex) { |
98 const char* value = (const char*) sqlite3_column_text(stmt, columnIndex); |
100 const char* value = (const char*) sqlite3_column_text(stmt, columnIndex); |
99 return value ? value : ""; // TODO: support NULL values (when supported in relpipe format) |
101 return value ? value : ""; // TODO: support NULL values (when supported in relpipe format) |
100 } |
102 } |
101 |
103 |
|
104 bool PreparedStatement::isComplete(const char* sql) { |
|
105 return sqlite3_complete(sql); |
|
106 } |
|
107 |
102 } |
108 } |
103 } |
109 } |
104 } |
110 } |