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
741d37c3
Commit
741d37c3
authored
Sep 01, 2013
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce changes made in SQLite 3.7.16 and 3.7.17.
parent
9fee036f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
blob_test.go
blob_test.go
+2
-2
meta.go
meta.go
+2
-2
meta_test.go
meta_test.go
+1
-1
sqlite.go
sqlite.go
+2
-0
No files found.
blob_test.go
View file @
741d37c3
...
...
@@ -69,6 +69,6 @@ func TestBlobMisuse(t *testing.T) {
bw
,
err
:=
db
.
NewBlobReadWriter
(
"main"
,
"test"
,
"content"
,
0
)
assert
(
t
,
"error expected"
,
bw
==
nil
&&
err
!=
nil
)
//println(err.Error())
err
=
bw
.
Close
()
assert
(
t
,
"error expected"
,
err
!=
nil
)
/*
err = bw.Close()
assert(t, "error expected", err != nil)
*/
}
meta.go
View file @
741d37c3
...
...
@@ -89,7 +89,7 @@ type Column struct {
DataType
string
NotNull
bool
DfltValue
string
// FIXME type ?
Pk
bool
Pk
int
Autoinc
bool
CollSeq
string
}
...
...
@@ -145,7 +145,7 @@ func (c *Conn) Column(dbName, tableName, columnName string) (*Column, error) {
return
nil
,
c
.
error
(
rv
,
fmt
.
Sprintf
(
"Conn.Column(db: %q, tbl: %q, col: %q)"
,
dbName
,
tableName
,
columnName
))
}
// TODO How to avoid copy?
return
&
Column
{
-
1
,
columnName
,
C
.
GoString
(
zDataType
),
notNull
==
1
,
""
,
primaryKey
==
1
,
return
&
Column
{
-
1
,
columnName
,
C
.
GoString
(
zDataType
),
notNull
==
1
,
""
,
int
(
primaryKey
)
,
autoinc
==
1
,
C
.
GoString
(
zCollSeq
)},
nil
}
...
...
meta_test.go
View file @
741d37c3
...
...
@@ -68,7 +68,7 @@ func TestColumn(t *testing.T) {
column
,
err
:=
db
.
Column
(
""
,
"test"
,
"id"
)
checkNoError
(
t
,
err
,
"error getting column metadata: %s"
)
assertEquals
(
t
,
"wrong column name: %q <> %q"
,
"id"
,
column
.
Name
)
assert
(
t
,
"expecting primary key flag to be true"
,
column
.
Pk
)
assert
Equals
(
t
,
"wrong primary key index: %d <> %d"
,
1
,
column
.
Pk
)
assert
(
t
,
"expecting autoinc flag to be false"
,
!
column
.
Autoinc
)
column
,
err
=
db
.
Column
(
"main"
,
"test"
,
"id"
)
...
...
sqlite.go
View file @
741d37c3
...
...
@@ -101,6 +101,8 @@ const (
ErrFormat
=
Errno
(
C
.
SQLITE_FORMAT
)
/* Auxiliary database format error */
ErrRange
=
Errno
(
C
.
SQLITE_RANGE
)
/* 2nd parameter to sqlite3_bind out of range */
ErrNotDB
=
Errno
(
C
.
SQLITE_NOTADB
)
/* File opened that is not a database file */
Notice
=
Errno
(
C
.
SQLITE_NOTICE
)
/* Notifications from sqlite3_log() */
Warning
=
Errno
(
C
.
SQLITE_WARNING
)
/* Warnings from sqlite3_log() */
Row
=
Errno
(
C
.
SQLITE_ROW
)
/* sqlite3_step() has another row ready */
Done
=
Errno
(
C
.
SQLITE_DONE
)
/* sqlite3_step() has finished executing */
ErrSpecific
=
Errno
(
-
1
)
/* Wrapper specific error */
...
...
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