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

Support passing the execution context as param to the query #110

Open
tabdulradi opened this issue Oct 23, 2016 · 0 comments
Open

Support passing the execution context as param to the query #110

tabdulradi opened this issue Oct 23, 2016 · 0 comments
Labels
Milestone

Comments

@tabdulradi
Copy link
Member

The following style needs to be supported

val create = withSchema { (authorId: String, title: String) => implicit ec: ExecutionContext =>
    cql"""
       INSERT INTO test.posts (author_id , post_id , post_title )
       VALUES ( $authorId, now(), $title);
     """.prepared.executeAsync
  }

This should work because we are preparing synchronously, ExecutionContext is needed only on execution of the query, this means it can be passed as param.

@tabdulradi tabdulradi added this to the 0.5 milestone Oct 23, 2016
@tabdulradi tabdulradi modified the milestones: 0.6, 0.5 Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant