You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by James Carman <ja...@carmanconsulting.com> on 2016/03/30 16:42:03 UTC
Adding Options to Create Statements...
I am trying to perform the following operation:
public Create createCreate() {
Create create =
SchemaBuilder.createTable("foo").addPartitionColumn("bar",
varchar()).addClusteringColumn("baz", varchar);
if(descending) {
create.withOptions().clusteringOrder("baz", Direction.DESC);
return create;
}
I don't want to have to return the Create.Options object from this method
(as I may need to add other columns). Is there a way to have the options
"decorate" the Create directly without having to return the Create.Options?
Re: Adding Options to Create Statements...
Posted by James Carman <ja...@carmanconsulting.com>.
But, if there were a Java driver provided by the Apache Cassandra project
itself, then it'd be an easy choice.
On Fri, Apr 1, 2016 at 2:16 PM Robert Coli <rc...@eventbrite.com> wrote:
> On Fri, Apr 1, 2016 at 10:43 AM, James Carman <ja...@carmanconsulting.com>
> wrote:
>
>> Ahhhh, my bad. One might wonder why the heck the Java driver is "owned"
>> by an outside entity, eh?
>>
>
> FWIW, the status quo prior to the Datastax drivers was a wide assortment
> of non-compatible drivers in different languages, not one set of
> officially-supported-by-the-Apache-project ones..
>
> ... you probably would not have preferred it? :D
>
> =Rob
>
>
Re: Adding Options to Create Statements...
Posted by Robert Coli <rc...@eventbrite.com>.
On Fri, Apr 1, 2016 at 10:43 AM, James Carman <ja...@carmanconsulting.com>
wrote:
> Ahhhh, my bad. One might wonder why the heck the Java driver is "owned"
> by an outside entity, eh?
>
FWIW, the status quo prior to the Datastax drivers was a wide assortment of
non-compatible drivers in different languages, not one set of
officially-supported-by-the-Apache-project ones..
... you probably would not have preferred it? :D
=Rob
Re: Adding Options to Create Statements...
Posted by Jonathan Haddad <jo...@jonhaddad.com>.
Because it's a community driver not provided by the Apache project. There
have historically been community provided drivers in the past. See
Hector, Astyanax, pycassa, etc.
On Fri, Apr 1, 2016 at 10:43 AM James Carman <ja...@carmanconsulting.com>
wrote:
> Ahhhh, my bad. One might wonder why the heck the Java driver is "owned"
> by an outside entity, eh?
>
> On Fri, Apr 1, 2016 at 11:58 AM Tyler Hobbs <ty...@datastax.com> wrote:
>
>> I'm not sure which driver you're referring to, but if it's the java
>> driver, it has its own mailing list that may be more helpful:
>> https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user
>>
>> On Thu, Mar 31, 2016 at 4:40 PM, James Carman <james@carmanconsulting.com
>> > wrote:
>>
>>> No thoughts? Would an upgrade of the driver "fix" this?
>>>
>>> On Wed, Mar 30, 2016 at 10:42 AM James Carman <
>>> james@carmanconsulting.com> wrote:
>>>
>>>> I am trying to perform the following operation:
>>>>
>>>> public Create createCreate() {
>>>> Create create =
>>>> SchemaBuilder.createTable("foo").addPartitionColumn("bar",
>>>> varchar()).addClusteringColumn("baz", varchar);
>>>> if(descending) {
>>>> create.withOptions().clusteringOrder("baz", Direction.DESC);
>>>> return create;
>>>> }
>>>>
>>>> I don't want to have to return the Create.Options object from this
>>>> method (as I may need to add other columns). Is there a way to have the
>>>> options "decorate" the Create directly without having to return the
>>>> Create.Options?
>>>>
>>>>
>>
>>
>> --
>> Tyler Hobbs
>> DataStax <http://datastax.com/>
>>
>
Re: Adding Options to Create Statements...
Posted by James Carman <ja...@carmanconsulting.com>.
Ahhhh, my bad. One might wonder why the heck the Java driver is "owned" by
an outside entity, eh?
On Fri, Apr 1, 2016 at 11:58 AM Tyler Hobbs <ty...@datastax.com> wrote:
> I'm not sure which driver you're referring to, but if it's the java
> driver, it has its own mailing list that may be more helpful:
> https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user
>
> On Thu, Mar 31, 2016 at 4:40 PM, James Carman <ja...@carmanconsulting.com>
> wrote:
>
>> No thoughts? Would an upgrade of the driver "fix" this?
>>
>> On Wed, Mar 30, 2016 at 10:42 AM James Carman <ja...@carmanconsulting.com>
>> wrote:
>>
>>> I am trying to perform the following operation:
>>>
>>> public Create createCreate() {
>>> Create create =
>>> SchemaBuilder.createTable("foo").addPartitionColumn("bar",
>>> varchar()).addClusteringColumn("baz", varchar);
>>> if(descending) {
>>> create.withOptions().clusteringOrder("baz", Direction.DESC);
>>> return create;
>>> }
>>>
>>> I don't want to have to return the Create.Options object from this
>>> method (as I may need to add other columns). Is there a way to have the
>>> options "decorate" the Create directly without having to return the
>>> Create.Options?
>>>
>>>
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>
Re: Adding Options to Create Statements...
Posted by Tyler Hobbs <ty...@datastax.com>.
I'm not sure which driver you're referring to, but if it's the java driver,
it has its own mailing list that may be more helpful:
https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user
On Thu, Mar 31, 2016 at 4:40 PM, James Carman <ja...@carmanconsulting.com>
wrote:
> No thoughts? Would an upgrade of the driver "fix" this?
>
> On Wed, Mar 30, 2016 at 10:42 AM James Carman <ja...@carmanconsulting.com>
> wrote:
>
>> I am trying to perform the following operation:
>>
>> public Create createCreate() {
>> Create create =
>> SchemaBuilder.createTable("foo").addPartitionColumn("bar",
>> varchar()).addClusteringColumn("baz", varchar);
>> if(descending) {
>> create.withOptions().clusteringOrder("baz", Direction.DESC);
>> return create;
>> }
>>
>> I don't want to have to return the Create.Options object from this method
>> (as I may need to add other columns). Is there a way to have the options
>> "decorate" the Create directly without having to return the Create.Options?
>>
>>
--
Tyler Hobbs
DataStax <http://datastax.com/>
Re: Adding Options to Create Statements...
Posted by James Carman <ja...@carmanconsulting.com>.
No thoughts? Would an upgrade of the driver "fix" this?
On Wed, Mar 30, 2016 at 10:42 AM James Carman <ja...@carmanconsulting.com>
wrote:
> I am trying to perform the following operation:
>
> public Create createCreate() {
> Create create =
> SchemaBuilder.createTable("foo").addPartitionColumn("bar",
> varchar()).addClusteringColumn("baz", varchar);
> if(descending) {
> create.withOptions().clusteringOrder("baz", Direction.DESC);
> return create;
> }
>
> I don't want to have to return the Create.Options object from this method
> (as I may need to add other columns). Is there a way to have the options
> "decorate" the Create directly without having to return the Create.Options?
>
>