Documentation ¶
Overview ¶
Package fastsql is a library which extends Go's standard database/sql library. It provides performance that's easy to take advantage of.
Even better, the fastsql.DB object embeds the standard sql.DB object meaning access to all the standard database/sql library functionality is preserved. It also means that integrating fastsql into existing codebases is a breeze.
Additional functionality inclues:
1. Easy, readable, and performant batch insert queries using the BatchInsert method. 2. Automatic creation and re-use of prepared statements. 3. A convenient holder for manually used prepared statements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { *sql.DB PreparedStatements map[string]*sql.Stmt // contains filtered or unexported fields }
DB is a database handle that embeds the standard library's sql.DB struct.
This means the fastsql.DB struct has, and allows, access to all of the standard library functionality while also providng a superset of functionality such as batch operations, autmatically created prepared statmeents, and more.
func (*DB) BatchInsert ¶
BatchInsert takes a singlular INSERT query and converts it to a batch-insert query for the caller. A batch-insert is ran every time BatchInsert is called a multiple of flushInterval times.