venom: Index | Files

package sql

import ""


Package Files



const Name = "sql"

Name of the executor.

func New Uses

func New() venom.Executor

New returns a new executor that can execute SQL queries

type Executor Uses

type Executor struct {
    File     string   `json:"file,omitempty" yaml:"file,omitempty"`
    Commands []string `json:"commands,omitempty" yaml:"commands,omitempty"`
    Driver   string   `json:"driver" yaml:"driver"`
    DSN      string   `json:"dsn" yaml:"dsn"`

Executor is a venom executor can execute SQL queries

func (Executor) GetDefaultAssertions Uses

func (e Executor) GetDefaultAssertions() venom.StepAssertions

GetDefaultAssertions return the default assertions of the executor.

func (Executor) Run Uses

func (e Executor) Run(testCaseContext venom.TestCaseContext, l venom.Logger, step venom.TestStep, workdir string) (venom.ExecutorResult, error)

Run implements the venom.Executor interface for Executor.

func (Executor) ZeroValueResult Uses

func (Executor) ZeroValueResult() venom.ExecutorResult

ZeroValueResult return an empty implemtation of this executor result

type QueryResult Uses

type QueryResult struct {
    Rows Rows `json:"rows,omitempty" yaml:"rows,omitempty"`

QueryResult represents a rows return by a SQL query execution.

type Result Uses

type Result struct {
    Executor Executor      `json:"executor,omitempty" yaml:"executor,omitempty"`
    Queries  []QueryResult `json:"queries,omitempty" yaml:"queries,omitempty"`

Result represents a step result.

type Row Uses

type Row map[string]interface{}

Row represents a row return by a SQL query.

type Rows Uses

type Rows []Row

Rows represents an array of Row

Package sql imports 9 packages (graph) and is imported by 4 packages. Updated 2019-12-03. Refresh now. Tools for package owners.