import "github.com/chdb-io/chdb-go/chdb"- func Query(queryStr string, outputFormats ...string) (result chdbpurego.ChdbResult, err error)
- func QueryStream(queryStr string, outputFormats ...string) (result chdbpurego.ChdbStreamResult, err error)
- type Session
- func NewSession(paths ...string) (*Session, error)
- func (s *Session) Cleanup()
- func (s *Session) Close()
- func (s *Session) ConnStr() string
- func (s *Session) IsTemp() bool
- func (s *Session) Path() string
- func (s *Session) Query(queryStr string, outputFormats ...string) (result chdbpurego.ChdbResult, err error)
- func (s *Session) QueryStream(queryStr string, outputFormats ...string) (result chdbpurego.ChdbStreamResult, err error)
func Query
func Query(queryStr string, outputFormats ...string) (result chdbpurego.ChdbResult, err error)Query calls query_conn with a default in-memory session and default output format of "CSV" if not provided.
func QueryStream
func QueryStream(queryStr string, outputFormats ...string) (result chdbpurego.ChdbStreamResult, err error)Query calls query_conn with a default in-memory session and default output format of "CSV" if not provided.
type Session
type Session struct {
// contains filtered or unexported fields
}func NewSession
func NewSession(paths ...string) (*Session, error)NewSession creates a new session with the given path. If path is empty, a temporary directory is created. Note: The temporary directory is removed when Close is called.
func (*Session) Cleanup
func (s *Session) Cleanup()Cleanup closes the session and removes the directory.
func (*Session) Close
func (s *Session) Close()Close closes the session and removes the temporary directory
temporary directory is created when NewSession was called with an empty path.
func (*Session) ConnStr
func (s *Session) ConnStr() stringConnStr returns the current connection string used for the underlying connection
func (*Session) IsTemp
func (s *Session) IsTemp() boolIsTemp returns whether the session is temporary.
func (*Session) Path
func (s *Session) Path() stringPath returns the path of the session.
func (*Session) Query
func (s *Session) Query(queryStr string, outputFormats ...string) (result chdbpurego.ChdbResult, err error)Query calls `query_conn` function with the current connection and a default output format of "CSV" if not provided.
func (*Session) QueryStream
func (s *Session) QueryStream(queryStr string, outputFormats ...string) (result chdbpurego.ChdbStreamResult, err error)QueryStream calls `query_conn` function with the current connection and a default output format of "CSV" if not provided. The result is a stream of data that can be read in chunks. This is useful for large datasets that cannot be loaded into memory all at once.
Generated by gomarkdoc