Skip to content

Commit

Permalink
Remove glt version
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Apr 30, 2024
1 parent 661cef6 commit 8ace718
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
39 changes: 0 additions & 39 deletions components/core/src/glt/SQLitePreparedStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,6 @@ int SQLitePreparedStatement::column_int(int parameter_index) const {
return sqlite3_column_int(m_statement_handle, parameter_index);
}

int SQLitePreparedStatement::column_int(string const& parameter_name) const {
if (false == m_row_ready) {
throw OperationFailed(ErrorCode_NotReady, __FILENAME__, __LINE__);
}
int parameter_index = sqlite3_bind_parameter_index(m_statement_handle, parameter_name.c_str());
if (0 == parameter_index) {
throw OperationFailed(ErrorCode_BadParam, __FILENAME__, __LINE__);
}

return column_int(parameter_index);
}

int64_t SQLitePreparedStatement::column_int64(int parameter_index) const {
if (false == m_row_ready) {
throw OperationFailed(ErrorCode_NotReady, __FILENAME__, __LINE__);
Expand All @@ -189,18 +177,6 @@ int64_t SQLitePreparedStatement::column_int64(int parameter_index) const {
return sqlite3_column_int64(m_statement_handle, parameter_index);
}

int64_t SQLitePreparedStatement::column_int64(string const& parameter_name) const {
if (false == m_row_ready) {
throw OperationFailed(ErrorCode_NotReady, __FILENAME__, __LINE__);
}
int parameter_index = sqlite3_bind_parameter_index(m_statement_handle, parameter_name.c_str());
if (0 == parameter_index) {
throw OperationFailed(ErrorCode_BadParam, __FILENAME__, __LINE__);
}

return column_int64(parameter_index);
}

void SQLitePreparedStatement::column_string(int parameter_index, std::string& value) const {
if (false == m_row_ready) {
throw OperationFailed(ErrorCode_NotReady, __FILENAME__, __LINE__);
Expand All @@ -211,19 +187,4 @@ void SQLitePreparedStatement::column_string(int parameter_index, std::string& va
sqlite3_column_bytes(m_statement_handle, parameter_index)
);
}

void SQLitePreparedStatement::column_string(
std::string const& parameter_name,
std::string& value
) const {
if (false == m_row_ready) {
throw OperationFailed(ErrorCode_NotReady, __FILENAME__, __LINE__);
}
int parameter_index = sqlite3_bind_parameter_index(m_statement_handle, parameter_name.c_str());
if (0 == parameter_index) {
throw OperationFailed(ErrorCode_BadParam, __FILENAME__, __LINE__);
}

column_string(parameter_index, value);
}
} // namespace glt
3 changes: 0 additions & 3 deletions components/core/src/glt/SQLitePreparedStatement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ class SQLitePreparedStatement {

bool step();
int column_int(int parameter_index) const;
int column_int(std::string const& parameter_name) const;
int64_t column_int64(int parameter_index) const;
int64_t column_int64(std::string const& parameter_name) const;
void column_string(int parameter_index, std::string& value) const;
void column_string(std::string const& parameter_name, std::string& value) const;

bool is_row_ready() const { return m_row_ready; }

Expand Down

0 comments on commit 8ace718

Please sign in to comment.