Created
July 8, 2021 13:14
-
-
Save rafaeldalsenter/6a13377a2cbfd99510df7978f6a64103 to your computer and use it in GitHub Desktop.
Cassandra query: C# Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Cassandra; | |
... | |
var cluster = Cluster.Builder() | |
.AddContactPoints("Ip 1", "Ip 2" ...) | |
.WithPort(9042) | |
.Build(); | |
var conn = cluster.Connect(); | |
var keyspaceNames = conn | |
.Execute("SELECT * FROM system_schema.keyspaces") | |
.Select(row => row.GetValue<string>("keyspace_name")); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment