generate

package
v0.0.0-...-b8b5728 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

This package generates all kind of CQL statements

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKeyspace

func CreateKeyspace(keyspaceName string) string

func CreateTable

func CreateTable(keySpace, cf string, partitionKeys, colKeys []string, fields []string, values []interface{}) (string, error)

CREATE TABLE users (

user_name varchar PRIMARY KEY,
password varchar,
gender varchar,
session_token varchar,
state varchar,
birth_year bigint

);

CREATE TABLE emp (

empID int,
deptID int,
first_name varchar,
last_name varchar,
PRIMARY KEY (empID, deptID)

);

func DeleteById

func DeleteById(cfName, pkName string) string

DELETE email, phone

FROM users
USING CONSISTENCY QUORUM AND TIMESTAMP 1318452291034
WHERE user_name = 'jsmith';

func ReadById

func ReadById(cfName string, pk string) string

func UseKeyspace

func UseKeyspace(keyspaceName string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL