Skip to content

Commit

Permalink
Add rundown to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
willfaught committed Nov 30, 2024
1 parent 0b0809e commit 4a94cc2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# gockle

[![Go Reference](https://pkg.go.dev/badge/github.com/willfaught/gockle.svg)](https://pkg.go.dev/github.com/willfaught/gockle)
Package gockle simplifies and mocks github.com/gocql/gocql. It provides simple interfaces to insert, query, and mutate Cassandra data, as well as get basic keyspace and table metadata.

*Note: Test coverage is low because there is no Cassandra database for the tests to use. Providing one yields 97.37% test coverage. Some code is uncovered because gocql cannot be mocked. This is one difficulty your code avoids by using gockle.*
The entry points are NewSession and NewSimpleSession. Call them to get a Session. Session interacts with the database. It executes queries and batched queries and iterates result rows. Closing the Session closes the underlying gocql.Session, including the one passed to NewSimpleSession.

Mocks are provided for testing use of Batch, Iterator, and Session.

Tx is short for transaction.

The name gockle comes from a pronunciation of gocql.

Note: Test coverage is low because there is no Cassandra database for the tests to use. Providing one yields 97.37% test coverage. Some code is uncovered because gocql cannot be mocked. This is one difficulty your code avoids by using gockle.

0 comments on commit 4a94cc2

Please sign in to comment.