persist

package
Version: v0.0.0-...-13330ff Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2015 License: BSD-2-Clause Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const MAX_SCREEN_RESULTS = 5000

//////////////////////////////BEGIN Screener Functions//////////////////////////////////////////// Using an implicit limit of 5000 in each query because if it's more than 5000, it's not a very good screen. Also... I don't want to deal with the performance of it being higher

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDbCompany

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

func NewMongoDbCompany

func NewMongoDbCompany(host, database string) *MongoDbCompany

func (*MongoDbCompany) GetCompany

func (mdc *MongoDbCompany) GetCompany(cik int64) *filings.Company

func (*MongoDbCompany) InsertUpdateCompany

func (mdc *MongoDbCompany) InsertUpdateCompany(company *filings.Company)

type MongoDbFinancialReports

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

func NewMongoDbFinancialReports

func NewMongoDbFinancialReports(host, database string) *MongoDbFinancialReports

func (*MongoDbFinancialReports) CreateFinancialReport

func (mdfr *MongoDbFinancialReports) CreateFinancialReport(fr *filings.FinancialReport)

func (*MongoDbFinancialReports) GetFinancialReport

func (mdfr *MongoDbFinancialReports) GetFinancialReport(cik, year, quarter int64) *filings.FinancialReport

func (*MongoDbFinancialReports) InsertUpdateFinancialReport

func (mdfr *MongoDbFinancialReports) InsertUpdateFinancialReport(fr *filings.FinancialReport)

type MongoDbFinancialReportsRaw

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

func NewMongoDbFinancialReportsRaw

func NewMongoDbFinancialReportsRaw(host, database string) *MongoDbFinancialReportsRaw

func (*MongoDbFinancialReportsRaw) GetRawReport

func (mdfrr *MongoDbFinancialReportsRaw) GetRawReport(cik, year, quarter int64) *filings.FinancialReportRaw

func (*MongoDbFinancialReportsRaw) InsertUpdateRawReport

func (mdfrr *MongoDbFinancialReportsRaw) InsertUpdateRawReport(rawReport *filings.FinancialReportRaw)

type MongoDbReportFiles

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

func NewMongoDbReportFiles

func NewMongoDbReportFiles(host, database string) *MongoDbReportFiles

func (*MongoDbReportFiles) GetNextUnparsedFiles

func (mdrf *MongoDbReportFiles) GetNextUnparsedFiles(numToGet int64) *[]filings.ReportFile

func (*MongoDbReportFiles) InsertUpdateReportFile

func (mdrf *MongoDbReportFiles) InsertUpdateReportFile(reportFile *filings.ReportFile)

type MysqlPbStockResearcher

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

TODO abandon this pattern and move functions into appropriate domains

func NewMysqlDb

func NewMysqlDb(user, pass, table string) *MysqlPbStockResearcher

func (*MysqlPbStockResearcher) GetCompany

func (mysql *MysqlPbStockResearcher) GetCompany(cik int64) *filings.Company

func (*MysqlPbStockResearcher) GetConnection

func (mysql *MysqlPbStockResearcher) GetConnection() *sql.DB

func (*MysqlPbStockResearcher) GetNextUnparsedFiles

func (mysql *MysqlPbStockResearcher) GetNextUnparsedFiles(numToGet int64) *[]filings.ReportFile

func (*MysqlPbStockResearcher) GetRatio

func (mysql *MysqlPbStockResearcher) GetRatio(ratioQuery string, year, quarter int, min, max float64) map[*filings.Company]float64

func (*MysqlPbStockResearcher) GetRawReport

func (mysql *MysqlPbStockResearcher) GetRawReport(cik, year, quarter int64) *filings.FinancialReportRaw

func (*MysqlPbStockResearcher) InsertUpdateCompany

func (mysql *MysqlPbStockResearcher) InsertUpdateCompany(company *filings.Company)

//////////////////////////////BEGIN Persistence Functions////////////////////////////////////////////

func (*MysqlPbStockResearcher) InsertUpdateFinancialReport

func (mysql *MysqlPbStockResearcher) InsertUpdateFinancialReport(fr *filings.FinancialReport)

func (*MysqlPbStockResearcher) InsertUpdateRawReport

func (mysql *MysqlPbStockResearcher) InsertUpdateRawReport(rawReport *filings.FinancialReportRaw)

func (*MysqlPbStockResearcher) InsertUpdateReportFile

func (mysql *MysqlPbStockResearcher) InsertUpdateReportFile(reportFile *filings.ReportFile)

func (*MysqlPbStockResearcher) ScreenAssetRatio

func (mysql *MysqlPbStockResearcher) ScreenAssetRatio(year, quarter int, min, max float64) map[*filings.Company]float64

func (*MysqlPbStockResearcher) ScreenCurrentRatio

func (mysql *MysqlPbStockResearcher) ScreenCurrentRatio(year, quarter int, min, max float64) map[*filings.Company]float64

func (*MysqlPbStockResearcher) ScreenNetMargin

func (mysql *MysqlPbStockResearcher) ScreenNetMargin(year, quarter int, min, max float64) map[*filings.Company]float64

type PersistCompany

type PersistCompany interface {
	InsertUpdateCompany(company *filings.Company)
	GetCompany(cik int64) *filings.Company
}

type PersistFinancialReports

type PersistFinancialReports interface {
	InsertUpdateFinancialReport(fr *filings.FinancialReport)
}

type PersistFinancialReportsRaw

type PersistFinancialReportsRaw interface {
	InsertUpdateRawReport(rawReport *filings.FinancialReportRaw)
	GetRawReport(cik, year, quarter int64) *filings.FinancialReportRaw
}

type PersistReportFiles

type PersistReportFiles interface {
	InsertUpdateReportFile(reportFile *filings.ReportFile)
	GetNextUnparsedFiles(numToGet int64) *[]filings.ReportFile
}

Jump to

Keyboard shortcuts

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