| 1 | //go:build !cgo |
| 2 | |
| 3 | package as400 |
| 4 | |
| 5 | import ( |
| 6 | "context" |
| 7 | "database/sql" |
| 8 | "errors" |
| 9 | ) |
| 10 | |
| 11 | type Config struct{} |
| 12 | |
| 13 | type Client struct{} |
| 14 | |
| 15 | func NewClient(Config) *Client { return &Client{} } |
| 16 | |
| 17 | func (c *Client) Connect(context.Context) error { return errors.New("as400 protocol requires cgo") } |
| 18 | func (c *Client) Ping(context.Context) error { return errors.New("as400 protocol requires cgo") } |
| 19 | func (c *Client) Close() error { return nil } |
| 20 | func (c *Client) DoQuery(context.Context, string, func(string, string, bool)) error { |
| 21 | return errors.New("as400 protocol requires cgo") |
| 22 | } |
| 23 | func (c *Client) DoQueryRow(context.Context, string, func(string, string)) error { |
| 24 | return errors.New("as400 protocol requires cgo") |
| 25 | } |
| 26 | func (c *Client) QueryRows(context.Context, string) (*sql.Rows, context.CancelFunc, error) { |
| 27 | return nil, nil, errors.New("as400 protocol requires cgo") |
| 28 | } |
| 29 | func (c *Client) DB() *sql.DB { return nil } |