-
-
Save juneym/5974370 to your computer and use it in GitHub Desktop.
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
<?php | |
require_once "./phpcassa/columnfamily.php"; | |
// Create new ConnectionPool like you normally would | |
$pool = new ConnectionPool("KeyspaceName", array("127.0.0.1")); | |
// Retrieve a raw connection from the ConnectionPool | |
$raw = $pool->get(); | |
$rows = $raw->client->execute_cql_query("SELECT * FROM ColumnFamily WHERE KEY = 1", cassandra_Compression::NONE); | |
// Return the connection to the pool so it may be used by other callers. Otherwise, | |
// the connection will be unavailable for use. | |
$pool->return_connection($raw); | |
unset($raw); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment