Passed
Push — main ( 9e2022...6ef1c9 )
by Christian
02:04 queued 14s
created

adapter/noop.go   A

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 10
dl 0
loc 18
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A adapter.*noopAdapter.ErrorHandler 0 2 1
A adapter.NewNoopAdapter 0 2 1
A adapter.*noopAdapter.Translate 0 2 1
1
package adapter
2
3
import (
4
	"github.com/cdleo/go-commons/sqlcommons"
5
)
6
7
type noopAdapter struct{}
8
9
func NewNoopAdapter() sqlcommons.SQLAdapter {
10
	return &noopAdapter{}
11
}
12
13
func (t *noopAdapter) Translate(query string) string {
14
	return query
15
}
16
17
func (s *noopAdapter) ErrorHandler(err error) error {
18
	return err
19
}
20