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

Implement is_decimal check function #4623

Closed
ghost opened this issue Nov 12, 2019 · 2 comments
Closed

Implement is_decimal check function #4623

ghost opened this issue Nov 12, 2019 · 2 comments
Assignees
Labels
feature A new functionality
Milestone

Comments

@ghost
Copy link

ghost commented Nov 12, 2019

It would be great to be able to check decimal values in lua.
Example:

local decimal = require('decimal')
local value = decimal.new(0)
decimal.is_decimal(value) -- true
decimal.is_decimal(0) -- false
@parihaaraka
Copy link

the global problem is a lack of simple way to acquire inner cdata type

> ffi.typeof(decimal.new(0)), ffi.typeof(0ULL)
---
- ctype<struct 106>
- ctype<uint64_t>
...

olegrok added a commit that referenced this issue Jan 9, 2020
Some of our users want to have a native method
to check is specified value decimal or not

Closes #4623

@TarantoolBot document
Title: decimal.is_decimal

is_decimal check function returns "true"
if specified value is decimal and "false" otherwise
@kyukhin kyukhin added this to the 2.4.1 milestone Jan 16, 2020
@kyukhin kyukhin added the feature A new functionality label Jan 16, 2020
olegrok added a commit that referenced this issue Jan 17, 2020
Some of our users want to have a native method
to check is specified value 'decimal' or not

This patch introduces 'is_decimal' check in 'decimal' module

Closes #4623

@TarantoolBot document
Title: decimal.is_decimal

is_decimal check function returns "true"
if specified value is decimal and "false" otherwise
@olegrok
Copy link
Collaborator

olegrok commented Feb 12, 2020

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

No branches or pull requests

3 participants