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
60ba4c36
Commit
60ba4c36
authored
Jul 06, 2014
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update main example.
parent
245e67ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
example_test.go
example_test.go
+2
-5
No files found.
example_test.go
View file @
60ba4c36
...
...
@@ -29,17 +29,14 @@ func Example() {
defer
ins
.
Finalize
()
_
,
err
=
ins
.
Insert
(
"gosqlite driver"
)
check
(
err
)
s
,
err
:=
db
.
Prepare
(
"SELECT name FROM test WHERE name LIKE ?"
,
"%go%"
)
check
(
err
)
defer
s
.
Finalize
()
var
name
string
err
=
s
.
Select
(
func
(
s
*
sqlite
.
Stmt
)
(
err
error
)
{
err
=
db
.
Select
(
"SELECT name FROM test WHERE name LIKE ?"
,
func
(
s
*
sqlite
.
Stmt
)
(
err
error
)
{
if
err
=
s
.
Scan
(
&
name
);
err
!=
nil
{
return
}
fmt
.
Println
(
name
)
return
})
}
,
"%go%"
)
check
(
err
)
// Output: gosqlite driver
}
...
...
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