Documentation
¶
Index ¶
- func CountUrlsWhere(ctx context.Context, db *sql.DB, where string, args ...interface{}) (int, error)
- func GetLatestTime(ctx context.Context, db *sql.DB, extractor types.Extractor) (*time.Time, error)
- func InitDb(ctx context.Context, c *config.AppConfig) (*sql.DB, error)
- func InsertUrl(ctx context.Context, db *sql.DB, row *types.UrlRow) error
- func InsertUrlMeta(ctx context.Context, db *sql.DB, row *types.UrlMetaRow) error
- func InsertVisit(ctx context.Context, db *sql.DB, row *types.VisitRow) error
- func OpenConnection(ctx context.Context, c *config.AppConfig) (*sql.DB, error)
- func UrlsById(ctx context.Context, db *sql.DB, ids ...string) ([]types.UrlDbEntity, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountUrlsWhere ¶
func CountUrlsWhere(ctx context.Context, db *sql.DB, where string, args ...interface{}) (int, error)
Count the number of urls that match the given where clause. URL meta is available in the where clause as well.
func GetLatestTime ¶
func InsertUrlMeta ¶
func OpenConnection ¶
Open a connection to the database. Calling code should close the connection when done. @note It is assumed that the database is already initialized. Thus this may be less useful than `InitDB`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.