From db12a1ac2db4cd14e063f4dc477490f4ac3b86c0 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Mon, 12 Jan 2015 15:16:35 +0200 Subject: [PATCH] cql3: Convert KSPropDefs to C++ Signed-off-by: Pekka Enberg --- cql3/cql3.cc | 1 + .../{KSPropDefs.java => ks_prop_defs.hh} | 29 +++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) rename cql3/statements/{KSPropDefs.java => ks_prop_defs.hh} (90%) diff --git a/cql3/cql3.cc b/cql3/cql3.cc index fcdd6b0a6f..2377f51e74 100644 --- a/cql3/cql3.cc +++ b/cql3/cql3.cc @@ -18,6 +18,7 @@ #include "functions/function_call.hh" #include "statements/cf_statement.hh" +#include "statements/ks_prop_defs.hh" #include "statements/use_statement.hh" #include "statements/parsed_statement.hh" #include "statements/property_definitions.hh" diff --git a/cql3/statements/KSPropDefs.java b/cql3/statements/ks_prop_defs.hh similarity index 90% rename from cql3/statements/KSPropDefs.java rename to cql3/statements/ks_prop_defs.hh index 7c054351df..4806368053 100644 --- a/cql3/statements/KSPropDefs.java +++ b/cql3/statements/ks_prop_defs.hh @@ -15,15 +15,33 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/* + * Copyright 2015 Cloudius Systems + * + * Modified by Cloudius Systems + */ + +#ifndef CQL3_STATEMENTS_KS_PROP_DEFS_HH +#define CQL3_STATEMENTS_KS_PROP_DEFS_HH + +#include "cql3/statements/property_definitions.hh" + +namespace cql3 { + +namespace statements { + +#if 0 package org.apache.cassandra.cql3.statements; import java.util.*; import org.apache.cassandra.config.KSMetaData; import org.apache.cassandra.exceptions.*; +#endif -public class KSPropDefs extends PropertyDefinitions -{ +class ks_prop_defs : public property_definitions { +#if 0 public static final String KW_DURABLE_WRITES = "durable_writes"; public static final String KW_REPLICATION = "replication"; @@ -86,4 +104,11 @@ public class KSPropDefs extends PropertyDefinitions } return KSMetaData.newKeyspace(old.name, sClass, sOptions, getBoolean(KW_DURABLE_WRITES, old.durableWrites)); } +#endif +}; + } + +} + +#endif