timescale

package
v0.0.0-...-3b9963d Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ALTER_QUERY = "ALTER TABLE goflow_records ALTER COLUMN %v TYPE %v"
View Source
const PRUNE_QUERY = "DELETE FROM goflow_records WHERE last_switched <= NOW() - INTERVAL '%v DAYS';"
View Source
const SIZE_QUERY = "SELECT * FROM hypertable_relation_size('goflow_records');"
View Source
const TEST_QUERY = `` /* 354-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryColumn

type BinaryColumn struct {
	Name    string
	Options string
	Type    string
	Wrap    string
	Field   uint16
}

# Binary Binary columns for binary data #

func (*BinaryColumn) GetName

func (c *BinaryColumn) GetName() string

func (*BinaryColumn) GetOptions

func (c *BinaryColumn) GetOptions() string

func (*BinaryColumn) GetType

func (c *BinaryColumn) GetType() string

func (*BinaryColumn) Init

func (c *BinaryColumn) Init() string

func (*BinaryColumn) InsertValue

func (c *BinaryColumn) InsertValue(v fields.Value) string

InsertValue Retrieves the string required to insert a value in a column using normal insert statement

type Column

type Column interface {
	InsertValue(value fields.Value) string
	GetName() string
	GetType() string
	GetOptions() string

	Init() string
	// contains filtered or unexported methods
}

type IntColumn

type IntColumn struct {
	Name    string
	Options string
	Type    string
	Wrap    string
	Field   uint16
}

# INTCOLMUMN Integer-based column and methods #

func (*IntColumn) GetName

func (c *IntColumn) GetName() string

func (*IntColumn) GetOptions

func (c *IntColumn) GetOptions() string

func (*IntColumn) GetType

func (c *IntColumn) GetType() string

func (*IntColumn) Init

func (c *IntColumn) Init() string

func (*IntColumn) InsertValue

func (c *IntColumn) InsertValue(v fields.Value) string

InsertValue Retrieves the string required to insert a value in a column using normal insert statement

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func (*Schema) AddBinaryColumn

func (s *Schema) AddBinaryColumn(f uint16, n string, t string, o string) *BinaryColumn

func (*Schema) AddIntColumn

func (s *Schema) AddIntColumn(f uint16, n string, t string, o string) *IntColumn

func (*Schema) GetColumn

func (s *Schema) GetColumn(c string) Column

func (*Schema) GetColumnStrings

func (s *Schema) GetColumnStrings(t string) string

func (*Schema) InsertQuery

func (s *Schema) InsertQuery(t string, v map[uint16]fields.Value) string

func (*Schema) InsertQueryFields

func (s *Schema) InsertQueryFields() string

type Tsdb

type Tsdb struct {
	Dbname  string
	Dbpass  string
	Dbuser  string
	Server  string
	SSLMode string

	CheckQuery    string
	AddQuery      string
	InitQuery     string
	AddIndexQuery string
	InsertQuery   string
	DropQuery     string
	AlterColQuery string
	// contains filtered or unexported fields
}

func (*Tsdb) Add

func (b *Tsdb) Add(values map[uint16]fields.Value)

func (*Tsdb) CheckSchema

func (b *Tsdb) CheckSchema()

func (*Tsdb) Configure

func (b *Tsdb) Configure(config map[string]string)

func (*Tsdb) Init

func (b *Tsdb) Init()

func (*Tsdb) Prune

func (b *Tsdb) Prune(interval string)

func (*Tsdb) Reinit

func (b *Tsdb) Reinit()

Re-initilize the database by dropping, and then re-adding, the schema This will remove all data within the DB.

func (*Tsdb) Status

func (b *Tsdb) Status() string

Status Returns information about this backend

Jump to

Keyboard shortcuts

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