Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feature: Support bigint parameters in thin mode #1572

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

Closed
sla100 wants to merge 1 commit into oracle:main from sla100:fetaure-support-bigint-input-bind-value
Closed

feature: Support bigint parameters in thin mode #1572

sla100 wants to merge 1 commit into oracle:main from sla100:fetaure-support-bigint-input-bind-value

Conversation

@sla100
Copy link

@sla100 sla100 commented Jun 9, 2023

Hello. There is a simple change which allow to pass build-in bigint type to parameters in thin node.
This allows you to pass large integers without conversion to string in js and CAST on the Oracle side.
Ex.:

const {rows} = await conn.execute( 'SELECT null FROM DUAL WHERE :A = (CAST :B AS NUMBER)', {
 A: 1_000_000_000_000_001n,
 B: 1_000_000_000_000_001n.toString(),
});
equal(rows.length, 1);
Signed-off-by: Sławomir Osoba <you@example.org>

Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jun 9, 2023
@cjbj cjbj added oca-verified and removed OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. labels Jun 13, 2023
Copy link
Member

We would also need to think about how to retrieve data from Oracle Database as bigint datatype as well.

Copy link
Author

sla100 commented Jun 13, 2023

We would also need to think about how to retrieve data from Oracle Database as bigint datatype as well.

This translation is already possible for columns.

const fetchTypeHandler = ({dbType, precision, scale}) => {
 if (dbType === oracledb.DB_TYPE_NUMBER && scale === 0 && precision > 15) {
 return {
 type: oracledb.STRING,
 converter: (v) => v === null ? null : BigInt(v),
 };
 }
};

Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as inactive because it has not been updated recently. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive This was marked by stalebot as inactive label Aug 12, 2023
@sharadraju sharadraju removed the inactive This was marked by stalebot as inactive label Aug 18, 2023
Copy link

stale bot commented Sep 17, 2023

This issue has been automatically marked as inactive because it has not been updated recently. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive This was marked by stalebot as inactive label Sep 17, 2023
@sharadraju sharadraju removed the inactive This was marked by stalebot as inactive label Nov 6, 2023
Copy link
Member

@sla100 This has been fixed in the 6.5 release. Thank you for your contribution!

sosoba reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /