aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE21
-rw-r--r--README.md9
-rw-r--r--backup.go7
-rw-r--r--error.go5
-rw-r--r--error_test.go5
-rw-r--r--sqlite3.go5
-rw-r--r--sqlite3_other.go4
-rw-r--r--sqlite3_test.go5
-rw-r--r--sqlite3_windows.go5
9 files changed, 65 insertions, 1 deletions
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.
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)
diff --git a/backup.go b/backup.go
index ab56961..4b2a72d 100644
--- a/backup.go
+++ b/backup.go
@@ -1,3 +1,8 @@
+// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
+//
+// Use of this source code is governed by an MIT-style
+// license that can be found in the LICENSE file.
+
package sqlite3
/*
@@ -31,7 +36,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)}
diff --git a/error.go b/error.go
index 52017bf..b910108 100644
--- a/error.go
+++ b/error.go
@@ -1,3 +1,8 @@
+// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
+//
+// 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..a006188 100644
--- a/error_test.go
+++ b/error_test.go
@@ -1,3 +1,8 @@
+// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
+//
+// 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 f133897..38eb942 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -1,3 +1,8 @@
+// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
+//
+// 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 <mattn.jp@gmail.com>.
+//
+// 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..581d289 100644
--- a/sqlite3_test.go
+++ b/sqlite3_test.go
@@ -1,3 +1,8 @@
+// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
+//
+// 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..269c05a 100644
--- a/sqlite3_windows.go
+++ b/sqlite3_windows.go
@@ -1,3 +1,8 @@
+// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
+//
+// Use of this source code is governed by an MIT-style
+// license that can be found in the LICENSE file.
+
package sqlite3
/*