class

ShardsDB

Inherits Reference < Object

Constants

JOBS_CHANNEL = "jobs"

Constructors

new(connection : DB::Connection)
Source

Class methods

application_name
Source
application_name=(application_name : String | Nil)
Source
connect
Source
database_url
Source
database_url=(database_url : String)
Source
listen_for_jobs
Source
statement_timeout
Source
statement_timeout=(statement_timeout : String | Nil)
Source
transaction
Source

Instance methods

all_categories
Source
all_releases(shard_id : Int64)
Source
connection
Source
create_category(category : Category)
Source
create_owner(owner : Repo::Owner)
Source
create_release(shard_id : Int64, release : Release, position : Int | Nil = nil)
Source
create_repo(repo : Repo)
Source
create_shard(shard : Shard)
Source
delete_categorizations(repo_refs : Array(Repo::Ref))
Source
delete_file(release_id, path)
Source
fetch_file(release_id, path)
Source
find_canonical_ref?(shard_id)
Source
find_canonical_repo(shard_id : Int64)
Source
find_mirror_repos(shard_id : Int64)
Source
get_owned_repos(owner_id : Int64)
Source
get_owner?(resolver : String, slug : String)
Source
get_owner?(repo_ref : Repo::Ref)
Source
get_repo(repo_id : Int64)
Source
get_repo(repo_ref : Repo::Ref)
Source
get_repo?(repo_ref : Repo::Ref)
Source
get_repo_id(resolver : String, url : String)
Source
get_repo_id(repo_ref : Repo::Ref)
Source
get_repo_id?(resolver : String, url : String)
Source
get_repo_id?(repo_ref : Repo::Ref)
Source
get_shard(shard_id : Int64)
Source
get_shard_id(name : String, qualifier : String = "")
Source
get_shard_id?(name : String, qualifier : Nil)
Source
get_shard_id?(name : String, qualifier : String = "")
Source
get_shards
Source
last_activities
Source
last_catalog_import
Source
last_metrics_calc
Source
last_repo_sync
Source
log_activity(event : String, repo_id : Int64 | Nil = nil, shard_id : Int64 | Nil = nil, metadata = nil, exc = nil)

LOGGING

Source
put_file(release_id, path, content)
Source
remove_category(slug : String)
Source
repo_sync_failed(repo)
Source
repos_pending_sync
Source
send_job_notification(message)
Source
set_owner(repo_ref : Repo::Ref, owner_id : Int64)
Source
shards_in_category(category_id : Int64 | Nil)
Source
sql_array(array)
Source
update_categorization(repo_ref : Repo::Ref, categories : Array(String))
Source
update_categorization(shard_id : Int64, categories : Array(String))
Source
update_category(category : Category)
Source
update_owner_shards_count(owner_id : Int64)
Source
update_release(release : Release)
Source
upsert_dependency(release_id : Int64, dependency : Dependency, repo_id = nil)
Source

Nested types