This file contains 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
// Use a prepared statement for all the INSERTs | |
PreparedStatement prepared = session.Prepare("INSERT INTO sometable (column1, column2) VALUES (?, ?)"); | |
// Create a list to hold in flight requests | |
var requestList = new List<Task>(); | |
// Assume you have some collection of data that needs to be inserted | |
foreach(var data in dataToInsert) | |
{ | |
// Provide data values to be inserted with our prepared statement for this piece of data |
This file contains 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 System; | |
using System.Linq; | |
using Cassandra; | |
namespace GettingStarted | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |