Skip to content

Commit

Permalink
Remove blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
marcboeker committed Feb 2, 2024
1 parent f7007ad commit 1bb88da
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions duckdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func (Driver) OpenConnector(dsn string) (driver.Connector, error) {
// The user must close the returned Connector, if it is not passed to the sql.OpenDB function.
// Otherwise, sql.DB closes the Connector when calling sql.DB.Close().
func NewConnector(dsn string, connInitFn func(execer driver.ExecerContext) error) (*Connector, error) {

var db C.duckdb_database

parsedDSN, err := url.Parse(dsn)
Expand Down Expand Up @@ -84,7 +83,6 @@ func (c *Connector) Driver() driver.Driver {
}

func (c *Connector) Connect(context.Context) (driver.Conn, error) {

var con C.duckdb_connection
if state := C.duckdb_connect(c.db, &con); state == C.DuckDBError {
return nil, errOpen
Expand Down Expand Up @@ -118,7 +116,6 @@ func extractConnectionString(dsn string) string {
}

func prepareConfig(parsedDSN *url.URL) (C.duckdb_config, error) {

var config C.duckdb_config
if state := C.duckdb_create_config(&config); state == C.DuckDBError {
C.duckdb_destroy_config(&config)
Expand Down Expand Up @@ -147,7 +144,6 @@ func prepareConfig(parsedDSN *url.URL) (C.duckdb_config, error) {
}

func setConfig(config C.duckdb_config, name string, option string) error {

cName := C.CString(name)
defer C.free(unsafe.Pointer(cName))

Expand Down
3 changes: 0 additions & 3 deletions rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ func scanString(vector C.duckdb_vector, rowIdx C.idx_t) string {
// duckdb/tools/juliapkg/src/ctypes.jl
// `json`, `varchar`, and `blob` are C-style char arrays
func scanBlob(vector C.duckdb_vector, rowIdx C.idx_t) []byte {

// we don't have to free s.ptr, as it is part of the data in the vector
s := get[duckdb_string_t](vector, rowIdx)

Expand Down Expand Up @@ -362,7 +361,6 @@ func scanStruct(ty C.duckdb_logical_type, vector C.duckdb_vector, rowIdx C.idx_t
data := map[string]any{}

for j := C.idx_t(0); j < C.duckdb_struct_type_child_count(ty); j++ {

ptrToChildName := C.duckdb_struct_type_child_name(ty, j)
name := C.GoString(ptrToChildName)
C.duckdb_free(unsafe.Pointer(ptrToChildName))
Expand Down Expand Up @@ -539,7 +537,6 @@ func logicalTypeNameStruct(lt C.duckdb_logical_type) string {
count := int(C.duckdb_struct_type_child_count(lt))
name := "STRUCT("
for i := 0; i < count; i++ {

ptrToChildName := C.duckdb_struct_type_child_name(lt, C.idx_t(i))
childName := C.GoString(ptrToChildName)
childLogicalType := C.duckdb_struct_type_child_type(lt, C.idx_t(i))
Expand Down

0 comments on commit 1bb88da

Please sign in to comment.