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
716de451
Commit
716de451
authored
May 27, 2018
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos reported by misspell
parent
d22febae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
driver.go
driver.go
+1
-1
driver_test.go
driver_test.go
+3
-3
sqlite.go
sqlite.go
+1
-1
sqlite_test.go
sqlite_test.go
+3
-3
No files found.
driver.go
View file @
716de451
...
...
@@ -205,7 +205,7 @@ func (c *conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, e
return
nil
,
driver
.
ErrBadConn
}
if
!
c
.
c
.
GetAutocommit
()
{
return
nil
,
errors
.
New
(
"Nested trans
ca
tions are not supported"
)
return
nil
,
errors
.
New
(
"Nested trans
ac
tions are not supported"
)
}
if
err
:=
c
.
c
.
SetQueryOnly
(
""
,
opts
.
ReadOnly
);
err
!=
nil
{
return
nil
,
err
...
...
driver_test.go
View file @
716de451
...
...
@@ -151,14 +151,14 @@ func TestSqlTx(t *testing.T) {
defer
checkSqlDbClose
(
db
,
t
)
tx
,
err
:=
db
.
Begin
()
checkNoError
(
t
,
err
,
"Error while begining tx: %s"
)
checkNoError
(
t
,
err
,
"Error while begin
n
ing tx: %s"
)
err
=
tx
.
Rollback
()
checkNoError
(
t
,
err
,
"Error while rollbacking tx: %s"
)
tx
,
err
=
db
.
Begin
()
checkNoError
(
t
,
err
,
"Error while begining tx: %s"
)
checkNoError
(
t
,
err
,
"Error while begin
n
ing tx: %s"
)
err
=
tx
.
Commit
()
checkNoError
(
t
,
err
,
"Error while commiting tx: %s"
)
checkNoError
(
t
,
err
,
"Error while commit
t
ing tx: %s"
)
}
func
TestSqlPrepare
(
t
*
testing
.
T
)
{
...
...
sqlite.go
View file @
716de451
...
...
@@ -266,7 +266,7 @@ func OpenVfs(filename string, vfsname string, flags ...OpenFlag) (*Conn, error)
Code
:
Errno
(
rv
),
Filename
:
filename
,
}
if
db
!=
nil
{
// try to extract futher details from db...
if
db
!=
nil
{
// try to extract fu
r
ther details from db...
err
.
ExtendedCode
=
int
(
C
.
sqlite3_extended_errcode
(
db
))
err
.
Msg
=
C
.
GoString
(
C
.
sqlite3_errmsg
(
db
))
C
.
sqlite3_close
(
db
)
...
...
sqlite_test.go
View file @
716de451
...
...
@@ -95,11 +95,11 @@ func TestManualTransaction(t *testing.T) {
if
err
:=
db
.
Begin
();
err
==
nil
{
t
.
Fatalf
(
"Error expected (transaction cannot be nested)"
)
}
checkNoError
(
t
,
db
.
Commit
(),
"Error while commiting transaction: %s"
)
checkNoError
(
t
,
db
.
Commit
(),
"Error while commit
t
ing transaction: %s"
)
checkNoError
(
t
,
db
.
BeginTransaction
(
Immediate
),
"Error while beginning immediate transaction: %s"
)
checkNoError
(
t
,
db
.
Commit
(),
"Error while commiting transaction: %s"
)
checkNoError
(
t
,
db
.
Commit
(),
"Error while commit
t
ing transaction: %s"
)
checkNoError
(
t
,
db
.
BeginTransaction
(
Exclusive
),
"Error while beginning immediate transaction: %s"
)
checkNoError
(
t
,
db
.
Commit
(),
"Error while commiting transaction: %s"
)
checkNoError
(
t
,
db
.
Commit
(),
"Error while commit
t
ing transaction: %s"
)
}
func
TestSavepoint
(
t
*
testing
.
T
)
{
...
...
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