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

Timeuuid to Timestamp support? #83

Open
ptcarino opened this issue Dec 9, 2016 · 0 comments
Open

Timeuuid to Timestamp support? #83

ptcarino opened this issue Dec 9, 2016 · 0 comments

Comments

@ptcarino
Copy link

ptcarino commented Dec 9, 2016

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;
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

No branches or pull requests

1 participant