Skip to content

Commit 5fa7af5

Browse files
committed
fix comments on connection.go
1 parent 0b87dd8 commit 5fa7af5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

chdb/connection.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Connection struct {
1414
isTemp bool
1515
}
1616

17-
// NewSession creates a new session with the given path.
17+
// NewConnection creates a new connection with the given path.
1818
// If path is empty, a temporary directory is created.
1919
// Note: The temporary directory is removed when Close is called.
2020
func NewConnection(paths ...string) (*Connection, error) {
@@ -52,9 +52,9 @@ func (s *Connection) Query(queryStr string, outputFormats ...string) (result *ch
5252
return connQueryToBuffer(s.conn, queryStr, outputFormat)
5353
}
5454

55-
// Close closes the session and removes the temporary directory
55+
// Close closes the connection and removes the temporary directory
5656
//
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.
5858
func (s *Connection) Close() {
5959
// Remove the temporary directory if it starts with "chdb_"
6060
s.conn.Close()
@@ -63,18 +63,18 @@ func (s *Connection) Close() {
6363
}
6464
}
6565

66-
// Cleanup closes the session and removes the directory.
66+
// Cleanup closes the connection and removes the directory.
6767
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
6969
_ = os.RemoveAll(s.path)
7070
}
7171

72-
// Path returns the path of the session.
72+
// Path returns the path of the connection.
7373
func (s *Connection) Path() string {
7474
return s.path
7575
}
7676

77-
// IsTemp returns whether the session is temporary.
77+
// IsTemp returns whether the connection is temporary.
7878
func (s *Connection) IsTemp() bool {
7979
return s.isTemp
8080
}

0 commit comments

Comments
 (0)