class Tag::Hashtag
- Tag::Hashtag
- Tag
- Reference
- Object
Included Modules
- School::DomainType
Defined in:
models/tag/hashtag.crrules/content_rules.cr
Class Method Summary
-
.all_objects(name, page = 1, size = 10)
Returns the objects with the given hashtag.
-
.all_objects_count(name)
Returns the count of objects with the given hashtag.
-
.most_recent_object(name)
Returns the most recent object with the given hashtag.
-
.public_posts(name, page = 1, size = 10)
Returns the site's public posts with the given hashtag.
-
.public_posts_count(name)
Returns the count of public posts with the given hashtag.
Instance Method Summary
- #_association_subject
- #_belongs_to_setter_for_subject(subject_ : ActivityPub::Object, update_associations = true) : ActivityPub::Object
- #after_create
- #after_destroy
- #before_save
- #subject(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object
- #subject=(subject_ : ActivityPub::Object) : ActivityPub::Object
- #subject?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object | Nil
Instance methods inherited from class Tag
after_create
after_create,
after_destroy
after_destroy,
href : String | Nil
href,
href=(href : String | Nil)
href=,
name : String
name,
name=(name : String)
name=,
short_type
short_type,
subject_iri : String
subject_iri,
subject_iri=(subject_iri : String)
subject_iri=
Class methods inherited from class Tag
cache
cache,
cache=(cache : Set(Tag::CacheEntry))
cache=,
match(prefix, limit = 1)
match,
short_type
short_type
Instance methods inherited from module Ktistec::Model::Polymorphic
as_a(as _as : T.class) : T forall T
as_a,
type : String
type,
type=(type : String)
type=
Macros inherited from module Ktistec::Model::Polymorphic
find(_id id, *, as _as)find(*, as _as, **options) find
Instance methods inherited from module Ktistec::Model::Common
created_at : Time
created_at,
created_at=(created_at : Time)
created_at=,
updated_at : Time
updated_at,
updated_at=(updated_at : Time)
updated_at=
Instance methods inherited from module Ktistec::Model
==(other : self)==(other) ==, _run_validations _run_validations, _save_model(skip_validation = false) _save_model, _serialize_graph(nodes, association = nil, index = nil, skip_associated = false) _serialize_graph, assign(properties : Hash(String, Any), *, _strict : Bool = false) forall Any
assign(*, _strict : Bool = false, **properties) assign, changed!(*properties : Symbol) changed!, changed?
changed?(*properties : Symbol) changed?, clear!
clear!(*properties : Symbol) clear!, destroy destroy, destroyed? destroyed?, errors errors, hash(hasher) hash, id : Int64 | Nil id, id=(id : Int64 | Nil) id=, inspect(io : IO) inspect, new_record? new_record?, reload! reload!, save(skip_validation = false, skip_associated = false) save, serialize_graph(skip_associated = false) serialize_graph, table_name table_name, to_h to_h, to_json(json : JSON::Builder) to_json, to_s(io : IO) to_s, update_property(property, value) update_property, valid?(skip_associated = false) valid?, validate(skip_associated = false) validate
Constructor methods inherited from module Ktistec::Model
new(properties : Hash(String, Any), *, _strict : Bool = false) forall Anynew(*, _strict : Bool = false, **properties) new
Macros inherited from module Ktistec::Model
belongs_to(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
belongs_to,
derived(decl, *, aliased_to)
derived,
has_many(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
has_many,
has_one(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
has_one,
validates(property, &block)
validates
Class Method Detail
Returns the objects with the given hashtag.
Includes private (not visible) objects.
Orders objects by id
for consistency with the query above.
Returns the count of objects with the given hashtag.
Uses the statistics table since there is no high cardinality way to subset and count the objects with a given hashtag.
Returns the most recent object with the given hashtag.
Orders objects by id
as an acceptable proxy for "most recent".
(This prevents the query from using a temporary b-tree for
ordering).
Includes private (not visible) objects.
Returns the site's public posts with the given hashtag.
Does not include private (not visible) posts. Includes other's posts that have been shared.
Returns the count of public posts with the given hashtag.
Does not include private (not visible) posts. Includes other's posts that have been shared.