Versions in this module Expand all Collapse all v0 v0.5.0 Mar 27, 2017 Changes in this version + var ErrInvalidArguments = errors.New("Invalid arguments given to PostgreSQL database") + type Database struct + func NewDatabase(options ...string) (*Database, error) + func (d *Database) Close() error + func (d *Database) CreateBook(b *note.Book) error + func (d *Database) CreateNote(n *note.Note) error + func (d *Database) CreateTag(t *note.Tag) error + func (d *Database) DeleteBook(bk *note.Book) error + func (d *Database) DeleteNote(n *note.Note) error + func (d *Database) EditBook(b *note.Book) error + func (d *Database) EditNote(n *note.Note) error + func (d *Database) EditNoteByIDBook(ids []int64, bk *note.Book) error + func (d *Database) GetAllBookNotes(book *note.Book, sortBy, order string) (note.Notes, error) + func (d *Database) GetAllBookTags(bk *note.Book) (note.Tags, error) + func (d *Database) GetAllBooks() (note.Books, error) + func (d *Database) GetAllNotes(sortBy, order string) (note.Notes, error) + func (d *Database) GetAllNotesByIDs(ids []int64) (note.Notes, error) + func (d *Database) GetAllTags() (note.Tags, error) + func (d *Database) GetBookByName(name string) (*note.Book, error) + func (d *Database) GetNoteByID(id int64) (*note.Note, error) + func (d *Database) GetNoteByNote(n *note.Note) error + func (d *Database) GetOrCreateBookByName(name string) (*note.Book, error) + func (d *Database) GetOrCreateTagByName(name string) (*note.Tag, error) + func (d *Database) GetTableNames() ([]string, error) + func (d *Database) GetTagByName(name string) (*note.Tag, error) + func (d *Database) GetTagsByName(name string) (*note.Tag, error) + func (d *Database) LoadBook(b *note.Book) error + func (d *Database) LoadNoteTags(n *note.Note) error + func (d *Database) MergeBooks(b1 *note.Book, b2 *note.Book) error + func (d *Database) ResetTables() error