go.charczuk.com@v0.0.0-20240327042549-bc490516bd1a/sdk/db/driver.go (about)

     1  /*
     2  
     3  Copyright (c) 2023 - Present. Will Charczuk. All rights reserved.
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file at the root of the repository.
     5  
     6  */
     7  
     8  package db
     9  
    10  /*
    11  USAGE NOTE from: https://github.com/jackc/pgx/blob/master/README.md#choosing-between-the-pgx-and-databasesql-interfaces
    12  
    13  The database/sql interface only allows the underlying driver to return or
    14  receive the following types: int64, float64, bool, []byte, string, time.Time, or nil.
    15  Handling other types requires implementing the database/sql.Scanner and the
    16  database/sql/driver/driver.Valuer interfaces which require transmission of values in text format.
    17  
    18  The binary format can be substantially faster, which is what the pgx interface uses.
    19  */
    20  
    21  import (
    22  	// the default driver is the stdlib version of pgx
    23  	_ "github.com/jackc/pgx/v4/stdlib"
    24  )