Skip to content

Timeuuid to Timestamp support? #83

Description

@ptcarino

Framework: Laravel 5.2
Cassandra version: 3.9

I managed to use the timeuuid function toTimestamp(now()) on my insert statements but when I used it on a select statement I got this error:

Invalid: Invalid call to function totimestamp, none of its type signatures match (known type signatures: system.totimestamp : (date) -> timestamp, system.totimestamp : (timeuuid) -> timestamp)

The select statement I've used is as follows:
SELECT room_id, username, mac, message, toTimestamp(created_at), ts_created FROM chat

and for the insert statement that worked for me:
INSERT INTO chat (room_id, username, mac, message, created_at, ts_created) VALUES (bbbcb63c-027e-427b-a6e5-b575a79de797, '$name', '$mac', '$msg', now(), toTimestamp(now()))

EDIT:
I'm trying to return the result of the querySync in my situation on this issue.

$response = $connection->querySync($statement);
$result = $response->fetchAll();

return $result;

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions