Commit 77b099d6 authored by gwenn's avatar gwenn

Misc

parent ac6deca5
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
package sqlite package sqlite
import ( import (
"bytes"
"database/sql/driver" "database/sql/driver"
"fmt" "fmt"
"time" "time"
...@@ -132,7 +133,7 @@ func (t TimeStamp) MarshalText() ([]byte, error) { ...@@ -132,7 +133,7 @@ func (t TimeStamp) MarshalText() ([]byte, error) {
// UnmarshalText implements the encoding.TextUnmarshaler interface. // UnmarshalText implements the encoding.TextUnmarshaler interface.
// Date is expected in RFC3339 format or null. // Date is expected in RFC3339 format or null.
func (t *TimeStamp) UnmarshalText(data []byte) error { func (t *TimeStamp) UnmarshalText(data []byte) error {
if len(data) > 0 && data[0] == 'n' { if bytes.Equal(data, []byte("null")) {
t.Time = time.Time{} t.Time = time.Time{}
return nil return nil
} }
......
...@@ -301,7 +301,7 @@ func (c *Conn) ProgressHandler(f ProgressHandler, numOps int32, udp interface{}) ...@@ -301,7 +301,7 @@ func (c *Conn) ProgressHandler(f ProgressHandler, numOps int32, udp interface{})
// StmtStatus enumerates status parameters for prepared statements // StmtStatus enumerates status parameters for prepared statements
type StmtStatus int32 type StmtStatus int32
// status counters for prepared statements // Status counters for prepared statements
const ( const (
StmtStatusFullScanStep StmtStatus = C.SQLITE_STMTSTATUS_FULLSCAN_STEP StmtStatusFullScanStep StmtStatus = C.SQLITE_STMTSTATUS_FULLSCAN_STEP
StmtStatusSort StmtStatus = C.SQLITE_STMTSTATUS_SORT StmtStatusSort StmtStatus = C.SQLITE_STMTSTATUS_SORT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment