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.mkd b/README.md similarity index 83% rename from README.mkd rename to README.md index 096d52f..3aa5b1e 100644 --- a/README.mkd +++ 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/_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 } 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 . +// +// 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 . +// +// 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 . +// +// 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 baa7fa3..e2ad600 100644 --- a/sqlite3.go +++ b/sqlite3.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 /* 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..581d289 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.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 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 . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + package sqlite3 /*