21 lines
306 B
Go
21 lines
306 B
Go
|
package exql
|
||
|
|
||
|
import (
|
||
|
"git.hexq.cn/tiglog/mydb/internal/cache"
|
||
|
)
|
||
|
|
||
|
// Fragment is any interface that can be both cached and compiled.
|
||
|
type Fragment interface {
|
||
|
cache.Hashable
|
||
|
|
||
|
compilable
|
||
|
}
|
||
|
|
||
|
type compilable interface {
|
||
|
Compile(*Template) (string, error)
|
||
|
}
|
||
|
|
||
|
type hasIsEmpty interface {
|
||
|
IsEmpty() bool
|
||
|
}
|