sqltest

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Escape

func Escape(query string) string

Escape escapes all regular expression metacharacters in the given query.

func Rows

func Rows(table string) *sqlmock.Rows

Rows converts MySQL/PostgreSQL table output to sql.Rows. All row values are parsed as text except the "nil" and NULL keywords. For example:

+-------------+-------------+-------------+----------------+
| column_name | column_type | is_nullable | column_default |
+-------------+-------------+-------------+----------------+
| c1          | float       | YES         | nil            |
| c2          | int         | YES         |                |
| c3          | double      | YES         | NULL           |
+-------------+-------------+-------------+----------------+

Types

This section is empty.

Jump to

Keyboard shortcuts

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