Skip to content

adding decimal support#19

Open
lbecker34 wants to merge 2 commits intocbschuld:masterfrom
lbecker34:decimal-support
Open

adding decimal support#19
lbecker34 wants to merge 2 commits intocbschuld:masterfrom
lbecker34:decimal-support

Conversation

@lbecker34
Copy link

@lbecker34 lbecker34 commented Jan 29, 2021

Change adds decimal support. Response for a decimal column from the AWS SDK is the following. Decimal columns are returned with a "stringValue" property.

{ "columnMetadata": [{ "arrayBaseColumnType": 0, "isAutoIncrement": false, "isCaseSensitive": false, "isCurrency": false, "isSigned": false, "label": "account", "name": "account", "nullable": 0, "precision": 100, "scale": 0, "schemaName": "", "tableName": "Movements", "type": 12, "typeName": "VARCHAR" }, { "arrayBaseColumnType": 0, "isAutoIncrement": false, "isCaseSensitive": true, "isCurrency": false, "isSigned": true, "label": "functional_amount", "name": "functional_amount", "nullable": 0, "precision": 27, "scale": 8, "schemaName": "", "tableName": "Movements", "type": 3, "typeName": "DECIMAL" }, { "arrayBaseColumnType": 0, "isAutoIncrement": false, "isCaseSensitive": true, "isCurrency": false, "isSigned": true, "label": "transaction_amount", "name": "transaction_amount", "nullable": 0, "precision": 27, "scale": 8, "schemaName": "", "tableName": "Movements", "type": 3, "typeName": "DECIMAL" } ], "numberOfRecordsUpdated": 0, "records": [ [{ "stringValue": "account" }, { "stringValue": "100.00000000" }, { "stringValue": "100.00000000" } ] ] }

@lbecker34
Copy link
Author

I just figured out that inserts and updates are removing decimal places and entering the "longValue" also. So, I'm working on that now.

@cbschuld
Copy link
Owner

@lbecker34 I have not had a ton of time to work on this but there is an active PR that you may want to look at too that changes the return style (was going to be a v2 style update)

@lbecker34
Copy link
Author

@cbschuld Is there still value in me doing this then? When do you think that other PR will be done? I can still try and fix the bug where decimals are being rounded down to the whole number on update too.

@lbecker34
Copy link
Author

lbecker34 commented Jan 29, 2021

@cbschuld This PR is now ready to go. I fixed the bug.

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

Successfully merging this pull request may close these issues.

3 participants