From b615bfa47e73bc9035347200863e8d9e2f5fb5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dziepak?= Date: Thu, 31 Dec 2015 12:51:52 +0100 Subject: [PATCH] cql3: add cf_prop_defs::get_default_time_to_live() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Dziepak --- cql3/statements/cf_prop_defs.cc | 5 +++++ cql3/statements/cf_prop_defs.hh | 2 ++ 2 files changed, 7 insertions(+) diff --git a/cql3/statements/cf_prop_defs.cc b/cql3/statements/cf_prop_defs.cc index b07f174821..e703c479d9 100644 --- a/cql3/statements/cf_prop_defs.cc +++ b/cql3/statements/cf_prop_defs.cc @@ -139,6 +139,11 @@ std::map cf_prop_defs::get_compression_options() const { return std::map{}; } +int32_t cf_prop_defs::get_default_time_to_live() const +{ + return get_int(KW_DEFAULT_TIME_TO_LIVE, 0); +} + void cf_prop_defs::apply_to_builder(schema_builder& builder) { if (has_property(KW_COMMENT)) { builder.set_comment(get_string(KW_COMMENT, "")); diff --git a/cql3/statements/cf_prop_defs.hh b/cql3/statements/cf_prop_defs.hh index 6a708cae27..571dcb515a 100644 --- a/cql3/statements/cf_prop_defs.hh +++ b/cql3/statements/cf_prop_defs.hh @@ -100,6 +100,8 @@ public: return options; } #endif + int32_t get_default_time_to_live() const; + void apply_to_builder(schema_builder& builder); void validate_minimum_int(const sstring& field, int32_t minimum_value, int32_t default_value) const; };