Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 241EC10E68 for ; Mon, 5 Jan 2015 21:31:34 +0000 (UTC) Received: (qmail 38751 invoked by uid 500); 5 Jan 2015 21:31:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 38710 invoked by uid 500); 5 Jan 2015 21:31:35 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 38698 invoked by uid 99); 5 Jan 2015 21:31:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jan 2015 21:31:35 +0000 Date: Mon, 5 Jan 2015 21:31:34 +0000 (UTC) From: "Michael Shuler (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-3025) PHP/PDO driver for Cassandra CQL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-3025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265139#comment-14265139 ] Michael Shuler commented on CASSANDRA-3025: ------------------------------------------- This bug shouldn't be reopened. At one time, some drivers were a part of the Cassandra source tree, but this is no longer the case, so drivers are not relevant to the Cassandra JIRA. There is a driver list on Planet Cassandra (which is maintained by DataStax) and the list contains some of the same items you discuss, thrift vs. cql, etc. http://planetcassandra.org/client-drivers-tools/ As you scratch your driver itch and make improvements, let the Planet Cassandra folks know, so they can update the list details. Cassandra JIRA != DataStax. > PHP/PDO driver for Cassandra CQL > -------------------------------- > > Key: CASSANDRA-3025 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3025 > Project: Cassandra > Issue Type: New Feature > Components: API > Reporter: Mikko Koppanen > Assignee: Mikko Koppanen > Labels: php > Attachments: pdo_cassandra-0.1.0.tgz, pdo_cassandra-0.1.1.tgz, pdo_cassandra-0.1.2.tgz, pdo_cassandra-0.1.3.tgz, pdo_cassandra-0.2.0.tgz, pdo_cassandra-0.2.1.tgz, php_test_results_20110818_2317.txt > > > Hello, > attached is the initial version of the PDO driver for Cassandra CQL language. This is a native PHP extension written in what I would call a combination of C and C++, due to PHP being C. The thrift API used is the C++. > The API looks roughly following: > {code} > $db = new PDO('cassandra:host=127.0.0.1;port=9160'); > $db->exec ("CREATE KEYSPACE mytest with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor=1;"); > $db->exec ("USE mytest"); > $db->exec ("CREATE COLUMNFAMILY users ( > my_key varchar PRIMARY KEY, > full_name varchar );"); > > $stmt = $db->prepare ("INSERT INTO users (my_key, full_name) VALUES (:key, :full_name);"); > $stmt->execute (array (':key' => 'mikko', ':full_name' => 'Mikko K' )); > {code} > Currently prepared statements are emulated on the client side but I understand that there is a plan to add prepared statements to Cassandra CQL API as well. I will add this feature in to the extension as soon as they are implemented. > Additional documentation can be found in github https://github.com/mkoppanen/php-pdo_cassandra, in the form of rendered MarkDown file. Tests are currently not included in the package file and they can be found in the github for now as well. > I have created documentation in docbook format as well, but have not yet rendered it. > Comments and feedback are welcome. > Thanks, > Mikko -- This message was sent by Atlassian JIRA (v6.3.4#6332)