From 9ac94b6fbfda6f25be5e3c17073aeed6de10428a Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 16 Jul 2014 17:56:05 +0900 Subject: [PATCH 1/8] Prefer md --- README.mkd => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.mkd => README.md (100%) diff --git a/README.mkd b/README.md similarity index 100% rename from README.mkd rename to README.md From 0cdea24bc72fac013abf416f27acd433e5906528 Mon Sep 17 00:00:00 2001 From: tonio3l Date: Tue, 29 Jul 2014 11:46:30 -0700 Subject: [PATCH 2/8] Update simple.go (very small change) Renaming the string "sql" into "sqlStmt" in order to prevent mixing with package types & functions sql.* in future edits or code reuse. --- _example/simple/simple.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_example/simple/simple.go b/_example/simple/simple.go index 21c09c9..a45c22b 100644 --- a/_example/simple/simple.go +++ b/_example/simple/simple.go @@ -17,13 +17,13 @@ func main() { } defer db.Close() - sql := ` + sqlStmt := ` create table foo (id integer not null primary key, name text); delete from foo; ` - _, err = db.Exec(sql) + _, err = db.Exec(sqlStmt) if err != nil { - log.Printf("%q: %s\n", err, sql) + log.Printf("%q: %s\n", err, sqlStmt) return } From d3334c1381db6a159cac1d2818ab2b543a166ad1 Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 16:52:06 +0900 Subject: [PATCH 3/8] Use code --- backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.go b/backup.go index ab56961..0e3d6fa 100644 --- a/backup.go +++ b/backup.go @@ -31,7 +31,7 @@ func (c *SQLiteConn) Backup(dest string, conn *SQLiteConn, src string) (*Backup, // function returns SQLITE_DONE (Code 101) func (b *Backup) Step(p int) (bool, error) { ret := C.sqlite3_backup_step(b.b, C.int(p)) - if ret == 101 { + if ret == C.SQLITE_DONE { return true, nil } else if ret != 0 { return false, Error{Code: ErrNo(ret)} From 592f5d512e03c0a0ed3d4c20e1d26b7b67594b1b Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 16:52:12 +0900 Subject: [PATCH 4/8] Add LICENSE file --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ca458bb --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 5e5d088a3662a12104630827ac6926f7626d23cf Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 16:56:31 +0900 Subject: [PATCH 5/8] Add license header --- backup.go | 4 ++++ doc.go | 5 +++++ error.go | 4 ++++ error_test.go | 4 ++++ sqlite3.go | 4 ++++ sqlite3_other.go | 4 ++++ sqlite3_test.go | 4 ++++ sqlite3_windows.go | 4 ++++ 8 files changed, 33 insertions(+) diff --git a/backup.go b/backup.go index 0e3d6fa..9e79c60 100644 --- a/backup.go +++ b/backup.go @@ -1,3 +1,7 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. package sqlite3 /* diff --git a/doc.go b/doc.go index 51364c3..f1c307b 100644 --- a/doc.go +++ b/doc.go @@ -1,3 +1,8 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + /* Package sqlite3 provides interface to SQLite3 databases. diff --git a/error.go b/error.go index 52017bf..59b5051 100644 --- a/error.go +++ b/error.go @@ -1,3 +1,7 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. package sqlite3 import "C" diff --git a/error_test.go b/error_test.go index e21f215..6a8660d 100644 --- a/error_test.go +++ b/error_test.go @@ -1,3 +1,7 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. package sqlite3 import ( diff --git a/sqlite3.go b/sqlite3.go index fc3e8ad..1683a48 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -1,3 +1,7 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. package sqlite3 /* diff --git a/sqlite3_other.go b/sqlite3_other.go index e8673ac..c87c01f 100644 --- a/sqlite3_other.go +++ b/sqlite3_other.go @@ -1,3 +1,7 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. // +build !windows package sqlite3 diff --git a/sqlite3_test.go b/sqlite3_test.go index 4f20026..0f10780 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.go @@ -1,3 +1,7 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. package sqlite3 import ( diff --git a/sqlite3_windows.go b/sqlite3_windows.go index e4ebc24..c5565e9 100644 --- a/sqlite3_windows.go +++ b/sqlite3_windows.go @@ -1,3 +1,7 @@ +// Copyright (C) 2014 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. package sqlite3 /* From 5b2191bd7a45448c99ae748255dbca0cc88d774b Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 16:58:14 +0900 Subject: [PATCH 6/8] Remove license header from doc.go because it appear in godoc --- doc.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/doc.go b/doc.go index f1c307b..51364c3 100644 --- a/doc.go +++ b/doc.go @@ -1,8 +1,3 @@ -// Copyright (C) 2014 Yasuhiro Matsumoto . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - /* Package sqlite3 provides interface to SQLite3 databases. From 6535341da906b68a836904b742145b409e961a56 Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 17:00:59 +0900 Subject: [PATCH 7/8] Add one blank line for godoc --- backup.go | 1 + error.go | 1 + error_test.go | 1 + sqlite3.go | 1 + sqlite3_test.go | 1 + sqlite3_windows.go | 1 + 6 files changed, 6 insertions(+) diff --git a/backup.go b/backup.go index 9e79c60..4b2a72d 100644 --- a/backup.go +++ b/backup.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 /* diff --git a/error.go b/error.go index 59b5051..b910108 100644 --- a/error.go +++ b/error.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 import "C" diff --git a/error_test.go b/error_test.go index 6a8660d..a006188 100644 --- a/error_test.go +++ b/error_test.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 import ( diff --git a/sqlite3.go b/sqlite3.go index 1683a48..aac71ad 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 /* diff --git a/sqlite3_test.go b/sqlite3_test.go index 0f10780..581d289 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 import ( diff --git a/sqlite3_windows.go b/sqlite3_windows.go index c5565e9..269c05a 100644 --- a/sqlite3_windows.go +++ b/sqlite3_windows.go @@ -2,6 +2,7 @@ // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. + package sqlite3 /* From 060db06a281a4f182a11585951c19be70a185a97 Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 18 Aug 2014 17:05:50 +0900 Subject: [PATCH 8/8] Add note about license of amalgamation code --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 096d52f..3aa5b1e 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,12 @@ License ------- MIT: http://mattn.mit-license.org/2012 + +sqlite.c, sqlite3.h, sqlite3ext.h + +In this repository, those files are amalgamation code that copied from SQLite3. The license of those codes are depend on the license of SQLite3. + +Author +------ + +Yasuhiro Matsumoto (a.k.a mattn)