database

package
v0.0.0-...-59ff9c4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DBNAME = "monty"

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

func NewConnection

func NewConnection(input NewConnectionInput) (conn Connection, err error)

func (*Connection) Close

func (conn *Connection) Close() error

func (*Connection) GenerateRunID

func (conn *Connection) GenerateRunID() (int, error)

func (*Connection) GetAllSubreddits

func (conn *Connection) GetAllSubreddits() (subs []string, err error)

func (*Connection) InsertSentimentResult

func (conn *Connection) InsertSentimentResult(input InsertSentimentResultInput) (err error)

func (*Connection) InsertSubreddit

func (conn *Connection) InsertSubreddit(name string) error

func (*Connection) UpdateWatermark

func (conn *Connection) UpdateWatermark(input UpdateWatermarkInput) error

func (*Connection) UpsertSubreddit

func (conn *Connection) UpsertSubreddit(name string) error

type InsertSentimentResultInput

type InsertSentimentResultInput struct {
	RunId                     int
	Subreddit                 string
	CountComments             int
	CountPosts                int
	ScoreCompoundMean         float64
	ScoreCompoundWeightedMean float64
}

type NewConnectionInput

type NewConnectionInput struct {
	Host     string
	Port     int
	User     string
	Password string
}

type UpdateWatermarkInput

type UpdateWatermarkInput struct {
	Id         int
	RunEnd     time.Time
	Successful bool
}

Jump to

Keyboard shortcuts

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