Documentation
¶
Overview ¶
Package common contains utility methods used by all adapters.
Index ¶
- func ExtractTags(update map[string]any) []string
- func FromJSON(src any) any
- func RangesToSql(in []t.Range) (string, []any)
- func SelectEarliestUpdatedSubs(subs []t.Subscription, opts *t.QueryOpt, maxResults int) []t.Subscription
- func SelectLatestTime(t1, t2 time.Time) time.Time
- func ToJSON(src any) []byte
- func UpdateByMap(update map[string]any) (cols []string, args []any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractTags ¶ added in v0.24.0
If Tags field is updated, get the tags so tags table cab be updated too.
func RangesToSql ¶ added in v0.24.0
RangesToSql converts a slice of ranges to SQL BETWEEN or IN() constraint and arguments.
func SelectEarliestUpdatedSubs ¶
func SelectEarliestUpdatedSubs(subs []t.Subscription, opts *t.QueryOpt, maxResults int) []t.Subscription
SelectEarliestUpdatedSubs selects no more than the given number of subscriptions from the given slice satisfying the query. When the number of subscriptions is greater than the limit, the subscriptions with the earliest timestamp are selected.
func SelectLatestTime ¶ added in v0.18.0
SelectLatestTime picks the latest update timestamp out of the two.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.