Skip to content

Commit f374e4c

Browse files
committed
Adding skeleton
1 parent 3cd1cf4 commit f374e4c

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

condition.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package query
2+
3+
type Operatior struct{}
4+
5+
type Condition interface {
6+
Operator() Operator
7+
}

query.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package query
2+
3+
type Builder interface {
4+
Select() Select
5+
SelectDistinct() Select
6+
SelectCount() Select
7+
// Update() Update
8+
// Delete() Delete
9+
// InsertInto() InsertInto
10+
// CreateDatabase() CreateDatabase
11+
// AlterDatabase() AlterDatase
12+
// CreateTable() CreateTable
13+
// AlterTable() AlterTable
14+
// DropTable() DropTable
15+
// CreateIndex() CreateIndex
16+
// DropIndex() DropIndex
17+
}
18+
19+
type Select interface {
20+
As(string) Rows
21+
Columns(...string) Rows
22+
All() Rows
23+
}
24+
25+
type Rows interface {
26+
FromTable(string) Table
27+
FromSelect(Select) Table
28+
}
29+
30+
type Table interface {
31+
Where(...Condition)
32+
}

0 commit comments

Comments
 (0)