File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ package expression
2
+
3
+ import "github.com/mvader/gitql/sql"
4
+
5
+ type Star struct {
6
+ }
7
+
8
+ func NewStar () * Star {
9
+ return & Star {}
10
+ }
11
+
12
+ func (Star ) Resolved () bool {
13
+ return false
14
+ }
15
+
16
+ func (Star ) Type () sql.Type {
17
+ return sql .String //FIXME
18
+ }
19
+
20
+ func (Star ) Name () string {
21
+ return "*"
22
+ }
23
+
24
+ func (Star ) Eval (r sql.Row ) interface {} {
25
+ return "FAIL" //FIXME
26
+ }
Original file line number Diff line number Diff line change
1
+ package expression
2
+
3
+ import (
4
+ "testing"
5
+
6
+ "github.com/mvader/gitql/sql"
7
+ "github.com/stretchr/testify/assert"
8
+ )
9
+
10
+ func TestStar (t * testing.T ) {
11
+ assert := assert .New (t )
12
+ var e sql.Expression = NewStar ()
13
+ assert .NotNil (e )
14
+ assert .Equal ("*" , e .Name ())
15
+ }
You can’t perform that action at this time.
0 commit comments