Return-Path: X-Original-To: apmail-cassandra-client-dev-archive@minotaur.apache.org Delivered-To: apmail-cassandra-client-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B315F11B58 for ; Wed, 9 Jul 2014 21:43:40 +0000 (UTC) Received: (qmail 41174 invoked by uid 500); 9 Jul 2014 21:43:40 -0000 Delivered-To: apmail-cassandra-client-dev-archive@cassandra.apache.org Received: (qmail 41147 invoked by uid 500); 9 Jul 2014 21:43:40 -0000 Mailing-List: contact client-dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: client-dev@cassandra.apache.org Delivered-To: mailing list client-dev@cassandra.apache.org Received: (qmail 41131 invoked by uid 99); 9 Jul 2014 21:43:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2014 21:43:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tyler@datastax.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2014 21:43:35 +0000 Received: by mail-lb0-f173.google.com with SMTP id s7so5419017lbd.4 for ; Wed, 09 Jul 2014 14:43:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=NE/Qtr7cCmrg90TAuyygcBHpQiDwh6QVk2IVobWGgJc=; b=L6A4/qUye1ZPclsTiPFtavbaXsfE76+jPjhPTkmp9GCGNUrLk9oz49E4l4h5kHdWBc tLVzivRAU7WX+PWFdolsI0L0f4s66ixK/8YpkQSdLfvV1tNZJE8XvY6TqKWNkv8Oz+gr E3jJqEEHOaSYi2ltXHIi2Z49KBgA1+tRRx95yNQxV1Bu3YfH/zFX5rUvTxYRVLvm/4fF AW5X1FPffovP9qkT2D8p6E+gL0PNKc9G2sPE2SU9bDgcqgwo2XGoRBynIwf7ldZD1wYq zxZ5vQByIUdEsWJ+5pgHfhuch66Y79ERM7KZSw9cNqYJQdwbNvsmSO++cA/156MBlyHv rq3w== X-Gm-Message-State: ALoCoQn1W8NQW1HLRfqHfWbYXkJqanME4gBo4jRvoqE7lbCRsBcO4SexyyUO3wlI6XiW4nEWiyF9 X-Received: by 10.152.4.73 with SMTP id i9mr29027157lai.50.1404942194142; Wed, 09 Jul 2014 14:43:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.122.178 with HTTP; Wed, 9 Jul 2014 14:42:54 -0700 (PDT) In-Reply-To: References: From: Tyler Hobbs Date: Wed, 9 Jul 2014 16:42:54 -0500 Message-ID: Subject: Re: Lua CQL driver To: client-dev@cassandra.apache.org Content-Type: multipart/alternative; boundary=089e01493d58698af904fdc9985f X-Virus-Checked: Checked by ClamAV on apache.org --089e01493d58698af904fdc9985f Content-Type: text/plain; charset=UTF-8 Awesome! I've added it to the Wiki list of drivers here: https://wiki.apache.org/cassandra/ClientOptions You should also mention this on the Cassandra user mailing list. On Wed, Jul 9, 2014 at 4:32 PM, Juarez Bochi wrote: > Hi, > > I have started the development of a cassandra cql driver in Lua. > > The code is available at https://github.com/jbochi/lua-resty-cassandra. > > It is missing some features > and > lacks > support for several types > but is already > usable: > > session = cassandra.new() > session:set_timeout(1000) > connected, err = session:connect("127.0.0.1", 9042) > > session:set_keyspace("lua_tests") > > local table_created, err = session:execute([[ > CREATE TABLE users ( > user_id uuid PRIMARY KEY, > name varchar, > age int > ) > ]]) > > local ok, err = session:execute([[ > INSERT INTO users (name, age, user_id) > VALUES (?, ?, ?) > ]], {"Juarez S' Bochi", 31, {type="uuid", > value="1144bada-852c-11e3-89fb-e0b9a54a6d11"}}) > local users, err = session:execute("SELECT name, age, user_id from > users") > assert.same(1, #users) > local user = users[1] > assert.same("Juarez S' Bochi", user.name) > assert.same("1144bada-852c-11e3-89fb-e0b9a54a6d11", user.user_id) > assert.same(31, user.age) > assert.truthy(ok) > > > Contributions and suggestions are welcome! > > https://github.com/jbochi/lua-resty-cassandra > > Thanks, > Juarez Bochi > -- Tyler Hobbs DataStax --089e01493d58698af904fdc9985f--