Documentation ¶
Overview ¶
The gocql package provides a database/sql driver for CQL, the Cassandra query language.
This package requires a recent version of Cassandra (≥ 1.2) that supports CQL 3.0 and the new native protocol. The native protocol is still considered beta and must be enabled manually in Cassandra 1.2 by setting "start_native_transport" to true in conf/cassandra.yaml.
Example Usage:
db, err := sql.Open("gocql", "localhost:9042 keyspace=system") // ... rows, err := db.Query("SELECT keyspace_name FROM schema_keyspaces") // ... for rows.Next() { var keyspace string err = rows.Scan(&keyspace) // ... fmt.Println(keyspace) } if err := rows.Err(); err != nil { // ... }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ValueConverter ¶
func (ValueConverter) ConvertValue ¶
func (vc ValueConverter) ConvertValue(v interface{}) (driver.Value, error)
Directories ¶
Path | Synopsis |
---|---|
The uuid package can be used to generate and parse universally unique identifiers, a standardized format in the form of a 128 bit number.
|
The uuid package can be used to generate and parse universally unique identifiers, a standardized format in the form of a 128 bit number. |
Click to show internal directories.
Click to hide internal directories.