MCPcopy Create free account
hub / github.com/apache/iotdb-client-go / newSessionPoolWithSqlDialect

Function newSessionPoolWithSqlDialect

client/sessionpool.go:61–78  ·  view source on GitHub ↗
(conf *PoolConfig, maxSize, connectionTimeoutInMs, waitToGetSessionTimeoutInMs int,
	enableCompression bool, sqlDialect string)

Source from the content-addressed store, hash-verified

59}
60
61func newSessionPoolWithSqlDialect(conf *PoolConfig, maxSize, connectionTimeoutInMs, waitToGetSessionTimeoutInMs int,
62 enableCompression bool, sqlDialect string) SessionPool {
63 conf.sqlDialect = sqlDialect
64 if maxSize <= 0 {
65 maxSize = runtime.NumCPU() * defaultMultiple
66 }
67 var ch = make(chan Session, maxSize)
68 var sem = make(chan int8, maxSize)
69 return SessionPool{
70 config: conf,
71 maxSize: maxSize,
72 waitToGetSessionTimeoutInMs: waitToGetSessionTimeoutInMs,
73 connectionTimeoutInMs: connectionTimeoutInMs,
74 enableCompression: enableCompression,
75 ch: ch,
76 sem: sem,
77 }
78}
79
80func (spool *SessionPool) GetSession() (session Session, err error) {
81 for {

Callers 2

NewTableSessionPoolFunction · 0.85
NewSessionPoolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…