Database Reference
In-Depth Information
AUTHORIZE : This is a special permission. This permission can be provided only
to the users that have the SUPERUSER privilege. It allows you to GRANT or
REVOKE permission on an entity.
Revoking permission using REVOKE
The REVOKE permission basically undoes what GRANT did. There are a couple of gotchas
that you should be aware of:
Superuser is a super user : You cannot revoke permissions from a superuser.
Mind the hierarchy : From bottom to top, table is the lowest level then keyspace,
and ALL KEYSPACES are over and above all. So, if you have a user that has the
SELECT permission across ALL KEYSPACES , you cannot remove the permis-
sion on a single table or on a single keyspace.
The syntax for REVOKE is as follows:
REVOKE { permission_type | REVOKE ALL PERMISSIONS }
ON
{ ALL KEYSPACES | KEYSPACE ks_name | TABLE
ks_name.table_name }
FROM
user_name;
The details stay the same as GRANT .
Inserting data
With the platform created, now we are ready to do what we will be doing the most in an
application: inserting and retrieving records. Inserting in Cassandra is similar to SQL with
a couple of extra options. Here's the pattern:
INSERT INTO table_name ( column_name1, column_name1, ...)
VALUES
( column_value1, column_value2, ... )
[ IF NOT EXISTS ]
[ USING [ TTL ttl_in_sec ] [ [ AND ] TIMESTAMP
ts_in_microsec ];
Search WWH ::




Custom Search