@@ -14,7 +14,7 @@ type Connection struct {
14
14
isTemp bool
15
15
}
16
16
17
- // NewSession creates a new session with the given path.
17
+ // NewConnection creates a new connection with the given path.
18
18
// If path is empty, a temporary directory is created.
19
19
// Note: The temporary directory is removed when Close is called.
20
20
func NewConnection (paths ... string ) (* Connection , error ) {
@@ -52,9 +52,9 @@ func (s *Connection) Query(queryStr string, outputFormats ...string) (result *ch
52
52
return connQueryToBuffer (s .conn , queryStr , outputFormat )
53
53
}
54
54
55
- // Close closes the session and removes the temporary directory
55
+ // Close closes the connection and removes the temporary directory
56
56
//
57
- // temporary directory is created when NewSession was called with an empty path.
57
+ // temporary directory is created when Newconnection was called with an empty path.
58
58
func (s * Connection ) Close () {
59
59
// Remove the temporary directory if it starts with "chdb_"
60
60
s .conn .Close ()
@@ -63,18 +63,18 @@ func (s *Connection) Close() {
63
63
}
64
64
}
65
65
66
- // Cleanup closes the session and removes the directory.
66
+ // Cleanup closes the connection and removes the directory.
67
67
func (s * Connection ) Cleanup () {
68
- // Remove the session directory, no matter if it is temporary or not
68
+ // Remove the connection directory, no matter if it is temporary or not
69
69
_ = os .RemoveAll (s .path )
70
70
}
71
71
72
- // Path returns the path of the session .
72
+ // Path returns the path of the connection .
73
73
func (s * Connection ) Path () string {
74
74
return s .path
75
75
}
76
76
77
- // IsTemp returns whether the session is temporary.
77
+ // IsTemp returns whether the connection is temporary.
78
78
func (s * Connection ) IsTemp () bool {
79
79
return s .isTemp
80
80
}
0 commit comments