Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 23ai BOOLEAN type #181

Open
jurahudak opened this issue Nov 1, 2024 · 0 comments
Open

Support 23ai BOOLEAN type #181

jurahudak opened this issue Nov 1, 2024 · 0 comments

Comments

@jurahudak
Copy link

The boolean type in 23ai is not recognized. Should be mapped to SQL_BOOLEAN, eg DBI::Shell added support for boolean formatting and uses SQL_BOOLEAN to identify such column.

select dump(to_boolean(1)) /
+-------------------+
|DUMP(TO_BOOLEAN(1))|
+-------------------+
|Typ=252 Len=1: 1   |
+-------------------+

Value in statement handler {TYPE} hashref should be SQL_BOOLEAN/16.

perl -MData::Dumper -MDBI -e ' $dbh = DBI->connect("dbi:Oracle:tcps://...oraclecloud.com", "...", "..."); $sth = $dbh->prepare("select to_boolean(0)"); print Dumper( $sth->{TYPE} );'
$VAR1 = [
          8
        ];

Now with this proper type value the DBI::Shell would start working as expected:

> /option bool_format=yep,nah
/option bool_format=yep,nah  (was TRUE,FALSE)  
> select to_boolean(0) union select to_boolean(1) /
+-------------+
|TO_BOOLEAN(0)|
+-------------+
|nah          |
|yep          |
+-------------+

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant