suppression des traces
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -17,8 +16,6 @@ type dbfield struct {
|
||||
type Dialect interface {
|
||||
TableExists(db *sql.DB, tableName string) (bool, error)
|
||||
ColumnSpec(f dbfield) (string, error)
|
||||
// ScanResult scans a single row into the provided destination slice
|
||||
// The row parameter can be *sql.Row or *sql.Rows, both implement Scan(dest ...any) error
|
||||
ScanResult(row interface{ Scan(dest ...any) error }, fields []any, fieldTypes []dbfield) error
|
||||
}
|
||||
|
||||
@@ -48,7 +45,6 @@ func NewTable[T any](db *sql.DB, dialect Dialect, tablename string) (Table[T], e
|
||||
stype: field.Type.String(),
|
||||
dbname: field.Tag.Get("db"),
|
||||
}
|
||||
fmt.Println(f.name, f.stype, f.dbname)
|
||||
fields = append(fields, f)
|
||||
}
|
||||
|
||||
@@ -81,7 +77,6 @@ func (t Table[T]) Sync() error {
|
||||
}
|
||||
columns[i] = c
|
||||
}
|
||||
sql := fmt.Sprintf("create table %s (%s)", t.tablename, strings.Join(columns, ","))
|
||||
_, err := t.db.Exec(sql)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user