Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Example_openDBService (0.15 sec)

  1. src/database/sql/example_service_test.go

    // license that can be found in the LICENSE file.
    
    package sql_test
    
    import (
    	"context"
    	"database/sql"
    	"encoding/json"
    	"fmt"
    	"io"
    	"log"
    	"net/http"
    	"time"
    )
    
    func Example_openDBService() {
    	// Opening a driver typically will not attempt to connect to the database.
    	db, err := sql.Open("driver-name", "database=test1")
    	if err != nil {
    		// This will not be a connection error, but a DSN parse error or
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 20:21:26 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top