• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H09-Jan-2021-4332

_examples/booktown-books/H09-Jan-2021-4032

internal/H09-Jan-2021-10,3597,683

lib/H09-Jan-2021-6,8505,050

mongo/H09-Jan-2021-2,4021,627

mssql/H09-Jan-2021-1,5621,036

mysql/H09-Jan-2021-2,5071,686

postgresql/H09-Jan-2021-3,6162,577

ql/H09-Jan-2021-1,502998

sqlite/H09-Jan-2021-1,518997

.gitignoreH A D09-Jan-202132 54

CHANGELOG.mdH A D09-Jan-2021742 3220

LICENSEH A D09-Jan-20211.1 KiB2116

MakefileH A D09-Jan-2021929 5136

README.mdH A D09-Jan-20213.7 KiB12899

collection.goH A D09-Jan-20212.7 KiB6110

comparison.goH A D09-Jan-20218 KiB335196

compound.goH A D09-Jan-20213.4 KiB13278

cond.goH A D09-Jan-20213.1 KiB11149

cond_test.goH A D09-Jan-2021867 7050

connection_url.goH A D09-Jan-20211.3 KiB304

constraint.goH A D09-Jan-20212.3 KiB6826

database.goH A D09-Jan-20212.4 KiB6713

db.goH A D09-Jan-20212.4 KiB751

env.goH A D09-Jan-20211.3 KiB3511

errors.goH A D09-Jan-20213.1 KiB5328

function.goH A D09-Jan-20212.1 KiB6819

function_test.goH A D09-Jan-20211.1 KiB5242

intersection.goH A D09-Jan-20212.3 KiB7323

logger.goH A D09-Jan-20213.9 KiB14783

marshal.goH A D09-Jan-20211.7 KiB387

raw.goH A D09-Jan-20212.7 KiB9643

result.goH A D09-Jan-20216.8 KiB19227

settings.goH A D09-Jan-20215 KiB192112

tx.goH A D09-Jan-20211.4 KiB325

union.goH A D09-Jan-20212 KiB6423

wrapper.goH A D09-Jan-20212.5 KiB8245

README.md

1<p align="center">
2  <img src="https://upper.io/db.v3/images/gopher.svg" width="256" />
3</p>
4
5# upper.io/db.v3 [![Build Status](https://travis-ci.org/upper/db.svg?branch=master)](https://travis-ci.org/upper/db) [![GoDoc](https://godoc.org/upper.io/db.v3?status.svg)](https://godoc.org/upper.io/db.v3)
6
7The `upper.io/db.v3` package for [Go][2] is a productive data access layer for
8Go that provides a common interface to work with different data sources such as
9[PostgreSQL](https://upper.io/db.v3/postgresql),
10[MySQL](https://upper.io/db.v3/mysql), [SQLite](https://upper.io/db.v3/sqlite),
11[MSSQL](https://upper.io/db.v3/mssql),
12[QL](https://upper.io/db.v3/ql) and [MongoDB](https://upper.io/db.v3/mongo).
13
14```
15go get upper.io/db.v3
16```
17
18## The tour
19
20![screen shot 2017-05-01 at 19 23 22](https://cloud.githubusercontent.com/assets/385670/25599675/b6fe9fea-2ea3-11e7-9f76-002931dfbbc1.png)
21
22Take the [tour](https://tour.upper.io) to see real live examples in your
23browser.
24
25## Live demos
26
27You can run the following example on our [playground](https://demo.upper.io):
28
29```go
30package main
31
32import (
33	"log"
34
35	"upper.io/db.v3/postgresql"
36)
37
38var settings = postgresql.ConnectionURL{
39	Host:     "demo.upper.io",
40	Database: "booktown",
41	User:     "demouser",
42	Password: "demop4ss",
43}
44
45type Book struct {
46	ID        int    `db:"id"`
47	Title     string `db:"title"`
48	AuthorID  int    `db:"author_id"`
49	SubjectID int    `db:"subject_id"`
50}
51
52func main() {
53	sess, err := postgresql.Open(settings)
54	if err != nil {
55		log.Fatalf("db.Open(): %q\n", err)
56	}
57	defer sess.Close()
58
59	var books []Book
60	err = sess.Collection("books").Find().All(&books)
61	if err != nil {
62		log.Fatalf("Find(): %q\n", err)
63	}
64
65	for i, book := range books {
66		log.Printf("Book %d: %#v\n", i, book)
67	}
68}
69```
70
71Or you can also run it locally from the `_examples` directory:
72
73```
74go run _examples/booktown-books/main.go
752016/08/10 08:42:48 "The Shining" (ID: 7808)
762016/08/10 08:42:48 "Dune" (ID: 4513)
772016/08/10 08:42:48 "2001: A Space Odyssey" (ID: 4267)
782016/08/10 08:42:48 "The Cat in the Hat" (ID: 1608)
792016/08/10 08:42:48 "Bartholomew and the Oobleck" (ID: 1590)
802016/08/10 08:42:48 "Franklin in the Dark" (ID: 25908)
812016/08/10 08:42:48 "Goodnight Moon" (ID: 1501)
822016/08/10 08:42:48 "Little Women" (ID: 190)
832016/08/10 08:42:48 "The Velveteen Rabbit" (ID: 1234)
842016/08/10 08:42:48 "Dynamic Anatomy" (ID: 2038)
852016/08/10 08:42:48 "The Tell-Tale Heart" (ID: 156)
862016/08/10 08:42:48 "Programming Python" (ID: 41473)
872016/08/10 08:42:48 "Learning Python" (ID: 41477)
882016/08/10 08:42:48 "Perl Cookbook" (ID: 41478)
892016/08/10 08:42:48 "Practical PostgreSQL" (ID: 41472)
90```
91
92## Documentation for users
93
94This is the source code repository, check out our [release
95notes](https://github.com/upper/db/releases/tag/v3.0.0) and see examples and
96documentation at [upper.io/db.v3][1].
97
98
99## Changelog
100
101See [CHANGELOG.md](https://github.com/upper/db/blob/master/CHANGELOG.md).
102
103## License
104
105Licensed under [MIT License](./LICENSE)
106
107## Authors and contributors
108
109* José Carlos Nieto <<jose.carlos@menteslibres.net>>
110* Peter Kieltyka <<peter@pressly.com>>
111* Maciej Lisiewski <<maciej.lisiewski@gmail.com>>
112* Max Hawkins <<maxhawkins@google.com>>
113* Paul Xue <<paul.xue@pressly.com>>
114* Kevin Darlington <<kdarlington@gmail.com>>
115* Lars Buitinck <<l.buitinck@esciencecenter.nl>>
116* icattlecoder <<icattlecoder@gmail.com>>
117* Aaron <<aaron.l.france@gmail.com>>
118* Hiram J. Pérez <<worg@linuxmail.org>>
119* Julien Schmidt <<github@julienschmidt.com>>
120* Max Hawkins <<maxhawkins@gmail.com>>
121* Piotr "Orange" Zduniak <<piotr@zduniak.net>>
122* achun <<achun.shx@qq.com>>
123* rjmcguire <<rjmcguire@gmail.com>>
124* wei2912 <<wei2912_support@hotmail.com>>
125
126[1]: https://upper.io/db.v3
127[2]: http://golang.org
128