postgres

package
v0.0.0-...-5c6c1e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

1. create "seaweedfs" database

export PGHOME=/Library/PostgreSQL/10
$PGHOME/bin/createdb --username=postgres --password seaweedfs

2. create "filemeta" table
$PGHOME/bin/psql --username=postgres --password seaweedfs

CREATE TABLE IF NOT EXISTS filemeta (
  dirhash     BIGINT,
  name        VARCHAR(65535),
  directory   VARCHAR(65535),
  meta        bytea,
  PRIMARY KEY (dirhash, name)
);

Documentation

Index

Constants

View Source
const (
	CONNECTION_URL_PATTERN = "host=%s port=%d sslmode=%s connect_timeout=30"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresStore

type PostgresStore struct {
	abstract_sql.AbstractSqlStore
}

func (*PostgresStore) GetName

func (store *PostgresStore) GetName() string

func (*PostgresStore) Initialize

func (store *PostgresStore) Initialize(configuration util.Configuration, prefix string) (err error)

type SqlGenPostgres

type SqlGenPostgres struct {
	CreateTableSqlTemplate string
	DropTableSqlTemplate   string
	UpsertQueryTemplate    string
}

func (*SqlGenPostgres) GetSqlCreateTable

func (gen *SqlGenPostgres) GetSqlCreateTable(tableName string) string

func (*SqlGenPostgres) GetSqlDelete

func (gen *SqlGenPostgres) GetSqlDelete(tableName string) string

func (*SqlGenPostgres) GetSqlDeleteFolderChildren

func (gen *SqlGenPostgres) GetSqlDeleteFolderChildren(tableName string) string

func (*SqlGenPostgres) GetSqlDropTable

func (gen *SqlGenPostgres) GetSqlDropTable(tableName string) string

func (*SqlGenPostgres) GetSqlFind

func (gen *SqlGenPostgres) GetSqlFind(tableName string) string

func (*SqlGenPostgres) GetSqlInsert

func (gen *SqlGenPostgres) GetSqlInsert(tableName string) string

func (*SqlGenPostgres) GetSqlListExclusive

func (gen *SqlGenPostgres) GetSqlListExclusive(tableName string) string

func (*SqlGenPostgres) GetSqlListInclusive

func (gen *SqlGenPostgres) GetSqlListInclusive(tableName string) string

func (*SqlGenPostgres) GetSqlUpdate

func (gen *SqlGenPostgres) GetSqlUpdate(tableName string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL