Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gosqlite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gosqlite
Commits
7c607295
Commit
7c607295
authored
Aug 04, 2013
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to understand travis test failure.
parent
3707aecc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
stmt.go
stmt.go
+4
-2
No files found.
stmt.go
View file @
7c607295
...
...
@@ -180,7 +180,7 @@ func (s *Stmt) Insert(args ...interface{}) (int64, error) {
if
n
==
0
{
// No change => no insert...
return
-
1
,
nil
}
return
s
.
c
.
LastInsertRowid
(),
nil
return
s
.
c
.
LastInsertRowid
(),
nil
// TODO what happens with INSERT OR IGNORE ...
}
// Select helps executing SELECT statement:
...
...
@@ -367,6 +367,7 @@ func (s *Stmt) BindByIndex(index int, value interface{}) error {
if
err
!=
nil
{
return
err
}
fmt
.
Printf
(
"BindByIndex: %s
\n
"
,
v
)
return
s
.
BindByIndex
(
index
,
v
)
default
:
return
s
.
BindReflect
(
index
,
value
)
...
...
@@ -568,7 +569,7 @@ func (s *Stmt) Scan(args ...interface{}) error {
// (See http://sqlite.org/c3ref/sql.html)
func
(
s
*
Stmt
)
SQL
()
string
{
if
s
.
sql
==
""
{
s
.
sql
=
C
.
GoString
(
C
.
sqlite3_sql
(
s
.
stmt
))
s
.
sql
=
C
.
GoString
(
C
.
sqlite3_sql
(
s
.
stmt
))
// TODO How to avoid copy?
}
return
s
.
sql
}
...
...
@@ -988,6 +989,7 @@ func (s *Stmt) ScanTime(index int) (value time.Time, isNull bool, err error) {
layout
=
"2006-01-02 15:04:05.999Z07:00"
}
}
fmt
.
Printf
(
"ScanTime: %s
\n
"
,
txt
)
value
,
err
=
time
.
Parse
(
layout
,
txt
)
// UTC except when timezone is specified
case
Integer
:
unixepoch
:=
int64
(
C
.
sqlite3_column_int64
(
s
.
stmt
,
C
.
int
(
index
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment