SwiftData icon indicating copy to clipboard operation
SwiftData copied to clipboard

It is not possible to store or retrieve an Int64

Open st3fan opened this issue 9 years ago • 2 comments

The library currently does not support the Int64 type. It should be possible to store and retrieve Int64 values by wrapping them in an NSNumber.

st3fan avatar Mar 06 '15 20:03 st3fan

I submitted a pull request to fix this issue: https://github.com/ryanfowler/SwiftData/pull/26

zwang avatar Aug 11 '15 23:08 zwang

/**
Return the column value as an Int64
:returns:  An Optional Int64 corresponding to the apprioriate column value. Will be nil if: the column name does not exist, the value cannot be cast as a Int64, or the value is NULL
*/
public func asInt64() -> Int64?
{
    return value as? Int64
}

RegisStGelais avatar Aug 12 '15 14:08 RegisStGelais