You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2015/07/07 20:24:04 UTC
[jira] [Commented] (CASSANDRA-9745) Allow validating values through
a UDF
[ https://issues.apache.org/jira/browse/CASSANDRA-9745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14617129#comment-14617129 ]
Jonathan Ellis commented on CASSANDRA-9745:
-------------------------------------------
I think this should be part of a rewrite of triggers to use UDF. A trigger already has the concept of "vetoing" an update; we should formalize this.
> Allow validating values through a UDF
> -------------------------------------
>
> Key: CASSANDRA-9745
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9745
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Sylvain Lebresne
> Priority: Minor
> Fix For: 3.x
>
>
> The only server side validation we do for values is currently that they match their type. Now that we have UDFs, we could allow to optionally specify a (boolean) value validation function on a per-column basis. This would give us a pretty generic way of validating value, which sounds useful to me.
> Once we have that, we could even add some syntactic sugar for some common type of validations, like {{v int[0..100]}} for numbers between 0 and 100, or {{v text[20]}} for a string that is not longer than 20, ... That's more of a follow up however.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)