equal
deleted
inserted
replaced
12 * GNU General Public License for more details. |
12 * GNU General Public License for more details. |
13 * |
13 * |
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 |
|
18 #include <cstring> |
17 |
19 |
18 #include "PreparedStatement.h" |
20 #include "PreparedStatement.h" |
19 |
21 |
20 namespace relpipe { |
22 namespace relpipe { |
21 namespace tr { |
23 namespace tr { |
92 // TODO: support also other data types |
94 // TODO: support also other data types |
93 } |
95 } |
94 |
96 |
95 std::string PreparedStatement::getString(int columnIndex) { |
97 std::string PreparedStatement::getString(int columnIndex) { |
96 const char* value = (const char*) sqlite3_column_text(stmt, columnIndex); |
98 const char* value = (const char*) sqlite3_column_text(stmt, columnIndex); |
97 return value ? value : ""; // TODO: support NULL values (when supported in relpipe format) |
99 return value ? value : ""; // TODO: support NULL values (when supported in relpipe format) |
98 } |
100 } |
99 |
101 |
100 } |
102 } |
101 } |
103 } |
102 } |
104 } |