@@ -35,7 +35,7 @@ type ConnConfig struct {
3535 // "cache_describe" query exec mode.
3636 DescriptionCacheCapacity int
3737
38- // DefaultQueryExecMode controls the default mode for executing queries. By default pgx uses the extended protocol
38+ // DefaultQueryExecMode controls the default mode for executing queries. By default gaussdbgo uses the extended protocol
3939 // and automatically prepares and caches prepared statements. However, this may be incompatible with proxies such as
4040 // PGBouncer. In this case it may be preferable to use QueryExecModeExec or QueryExecModeSimpleProtocol. The same
4141 // functionality can be controlled on a per query basis by passing a QueryExecMode as the first query argument.
@@ -59,7 +59,7 @@ func (cc *ConnConfig) Copy() *ConnConfig {
5959 return newConfig
6060}
6161
62- // ConnString returns the connection string as parsed by pgx .ParseConfig into pgx .ConnConfig.
62+ // ConnString returns the connection string as parsed by gaussdbgo .ParseConfig into gaussdbgo .ConnConfig.
6363func (cc * ConnConfig ) ConnString () string { return cc .connString }
6464
6565// Conn is a GaussDB connection handle. It is not safe for concurrent usage. Use a connection pool to manage access
@@ -130,7 +130,7 @@ var (
130130)
131131
132132// Connect establishes a connection with a GaussDB server with a connection string. See
133- // pgconn .Connect for details.
133+ // gaussdbconn .Connect for details.
134134func Connect (ctx context.Context , connString string ) (* Conn , error ) {
135135 connConfig , err := ParseConfig (connString )
136136 if err != nil {
@@ -218,7 +218,7 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con
218218 return connConfig , nil
219219}
220220
221- // ParseConfig creates a ConnConfig from a connection string. ParseConfig handles all options that [pgconn .ParseConfig]
221+ // ParseConfig creates a ConnConfig from a connection string. ParseConfig handles all options that [gaussdbconn .ParseConfig]
222222// does. In addition, it accepts the following options:
223223//
224224// - default_query_exec_mode.
@@ -267,7 +267,7 @@ func connect(ctx context.Context, config *ConnConfig) (c *Conn, err error) {
267267 c .prepareTracer = t
268268 }
269269
270- // Only install pgx notification system if no other callback handler is present.
270+ // Only install gaussdbgo notification system if no other callback handler is present.
271271 if config .Config .OnNotification == nil {
272272 config .Config .OnNotification = c .bufferNotifications
273273 }
@@ -395,7 +395,7 @@ func (c *Conn) bufferNotifications(_ *gaussdbconn.GaussdbConn, n *gaussdbconn.No
395395 c .notifications = append (c .notifications , n )
396396}
397397
398- // WaitForNotification waits for a GaussDB notification. It wraps the underlying pgconn notification system in a
398+ // WaitForNotification waits for a GaussDB notification. It wraps the underlying gaussdbconn notification system in a
399399// slightly more convenient form.
400400func (c * Conn ) WaitForNotification (ctx context.Context ) (* gaussdbconn.Notification , error ) {
401401 var n * gaussdbconn.Notification
@@ -434,16 +434,16 @@ func quoteIdentifier(s string) string {
434434 return `"` + strings .ReplaceAll (s , `"` , `""` ) + `"`
435435}
436436
437- // Ping delegates to the underlying *pgconn .GaussdbConn.Ping.
437+ // Ping delegates to the underlying *gaussdbconn .GaussdbConn.Ping.
438438func (c * Conn ) Ping (ctx context.Context ) error {
439439 return c .gaussdbConn .Ping (ctx )
440440}
441441
442- // GaussdbConn returns the underlying *pgconn .GaussdbConn. This is an escape hatch method that allows lower level access to the
443- // GaussDB connection than pgx exposes.
442+ // GaussdbConn returns the underlying *gaussdbconn .GaussdbConn. This is an escape hatch method that allows lower level access to the
443+ // GaussDB connection than gaussdbgo exposes.
444444//
445- // It is strongly recommended that the connection be idle (no in-progress queries) before the underlying *pgconn .GaussdbConn
446- // is used and the connection must be returned to the same state before any *pgx .Conn methods are again used.
445+ // It is strongly recommended that the connection be idle (no in-progress queries) before the underlying *gaussdbconn .GaussdbConn
446+ // is used and the connection must be returned to the same state before any *gaussdbgo .Conn methods are again used.
447447func (c * Conn ) GaussdbConn () * gaussdbconn.GaussdbConn { return c .gaussdbConn }
448448
449449// TypeMap returns the connection info used for this connection.
@@ -639,7 +639,7 @@ const (
639639
640640 // Assume the GaussDB query parameter types based on the Go type of the arguments. This uses the extended protocol
641641 // with text formatted parameters and results. Queries are executed in a single round trip. Type mappings can be
642- // registered with pgtype .Map.RegisterDefaultGaussdbType. Queries will be rejected that have arguments that are
642+ // registered with gaussdbtype .Map.RegisterDefaultGaussdbType. Queries will be rejected that have arguments that are
643643 // unregistered or ambiguous. e.g. A map[string]string may have the GaussDB type json or hstore. Modes that know
644644 // the GaussDB type can use a map[string]string directly as an argument. This mode cannot.
645645 //
@@ -648,15 +648,15 @@ const (
648648 // Roman numerals (e.g. 7 is VII). The binary format would properly encode the integer 7 as the binary value for 7.
649649 // But the text format would encode the integer 7 as the string "VII". As QueryExecModeExec uses the text format, it
650650 // is possible that changing query mode from another mode to QueryExecModeExec could change the behavior of the query.
651- // This should not occur with types pgx supports directly and can be avoided by registering the types with
652- // pgtype .Map.RegisterDefaultGaussdbType and implementing the appropriate type interfaces. In the cas of RomanNumeral, it
653- // should implement pgtype .Int64Valuer.
651+ // This should not occur with types gaussdbgo supports directly and can be avoided by registering the types with
652+ // gaussdbtype .Map.RegisterDefaultGaussdbType and implementing the appropriate type interfaces. In the cas of RomanNumeral, it
653+ // should implement gaussdbtype .Int64Valuer.
654654 QueryExecModeExec
655655
656656 // Use the simple protocol. Assume the GaussDB query parameter types based on the Go type of the arguments. This is
657657 // especially significant for []byte values. []byte values are encoded as GaussDB bytea. string must be used
658658 // instead for text type values including json and jsonb. Type mappings can be registered with
659- // pgtype .Map.RegisterDefaultGaussdbType. Queries will be rejected that have arguments that are unregistered or ambiguous.
659+ // gaussdbtype .Map.RegisterDefaultGaussdbType. Queries will be rejected that have arguments that are unregistered or ambiguous.
660660 // e.g. A map[string]string may have the GaussDB type json or hstore. Modes that know the GaussDB type can use a
661661 // map[string]string directly as an argument. This mode cannot. Queries are executed in a single round trip.
662662 //
@@ -1243,8 +1243,8 @@ func (c *Conn) sanitizeForSimpleQuery(sql string, args ...any) (string, error) {
12431243 return sanitize .SanitizeSQL (sql , valueArgs ... )
12441244}
12451245
1246- // LoadType inspects the database for typeName and produces a pgtype .Type suitable for registration. typeName must be
1247- // the name of a type where the underlying type(s) is already understood by pgx . It is for derived types. In particular,
1246+ // LoadType inspects the database for typeName and produces a gaussdbtype .Type suitable for registration. typeName must be
1247+ // the name of a type where the underlying type(s) is already understood by gaussdbgo . It is for derived types. In particular,
12481248// typeName must be one of the following:
12491249// - An array type name of a type that is already registered. e.g. "_foo" when "foo" is registered.
12501250// - A composite type name where all field types are already registered.
0 commit comments