Skip to content

Commit

Permalink
Boolean support for SET
Browse files Browse the repository at this point in the history
+ Add SET support for boolean (firebird v3)

You can add row now ^^

* Pseudo support for GET but not visible (why ?)

TODO:
+ ColType dislay (1) (probably for <type>(<size>) from string)!
  • Loading branch information
Tutul- committed Nov 15, 2016
1 parent 3069ce7 commit 678d5d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/gui/DataGeneratorFrame.cpp
Expand Up @@ -1122,6 +1122,8 @@ void setFromFile(IBPP::Statement st, int param,
dt = IBPP::sdDouble;
switch (dt)
{
case IBPP::sdBoolean: // v3
st->Set(param, wx2std(selected)); break;
case IBPP::sdString:
st->Set(param, wx2std(selected)); break;
case IBPP::sdSmallint:
Expand Down Expand Up @@ -1466,6 +1468,8 @@ void DataGeneratorFrame::setParam(IBPP::Statement st, int param,
{
switch (st->ParameterType(param))
{
case IBPP::sdBoolean: // v3
setFromOther<std::string>(st, param, gs, recNo); break;
case IBPP::sdString:
setFromOther<std::string>(st, param, gs, recNo); break;
case IBPP::sdSmallint:
Expand Down Expand Up @@ -1496,6 +1500,8 @@ void DataGeneratorFrame::setParam(IBPP::Statement st, int param,
{
switch (st->ParameterType(param))
{
case IBPP::sdBoolean: // v3
setString(st, param, gs, recNo); break;
case IBPP::sdString:
setString(st, param, gs, recNo); break;
case IBPP::sdSmallint:
Expand Down
3 changes: 3 additions & 0 deletions src/gui/controls/DataGridRows.cpp
Expand Up @@ -1745,6 +1745,9 @@ bool DataGridRows::initialize(const IBPP::Statement& statement)
{
switch (type)
{
case IBPP::sdBoolean: // v3
columnDef = new StringColumnDef(colName, 0, readOnly, nullable, 4);
break;
case IBPP::sdDate:
columnDef = new DateColumnDef(colName, bufferSizeM, readOnly, nullable);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/ibpp/row.cpp
Expand Up @@ -697,7 +697,7 @@ IBPP::SDT RowImpl::ColumnType(int varnum)
case SQL_TYPE_TIME : value = IBPP::sdTime; break;
case SQL_BLOB : value = IBPP::sdBlob; break;
case SQL_ARRAY : value = IBPP::sdArray; break;
case SQL_BOOLEAN : value = IBPP::sdString; break;
case SQL_BOOLEAN : value = IBPP::sdBoolean; break;
default : throw LogicExceptionImpl("Row::ColumnType",
_("Found an unknown sqltype !"));
}
Expand Down

0 comments on commit 678d5d4

Please sign in to comment.