Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyRegistry = errors.New("type registry is empty")
Functions ¶
This section is empty.
Types ¶
type GoStream ¶
type GoStream struct {
// contains filtered or unexported fields
}
func (*GoStream) Query ¶
Example ¶
package main
import (
"fmt"
"time"
"github.com/itsubaki/gostream"
)
func main() {
type LogEvent struct {
Time time.Time
Level int
Message string
}
s, err := gostream.
New(&gostream.Option{
Verbose: true,
}).
Add(LogEvent{}).
Query("select * from LogEvent.length(10)")
if err != nil {
fmt.Printf("query: %v", err)
return
}
defer s.Close()
fmt.Println(s)
}
Output: SELECT * FROM IDENT(LogEvent) . LENGTH ( INT(10) ) SELECT * FROM LogEvent.LENGTH(10)
Click to show internal directories.
Click to hide internal directories.