module Globals::Extra::ClassMethods

Overview

Additional methods for class model.

Extended Modules

Defined in:

app/globals/extra/class_methods.cr

Constant Summary

THUMBNAIL_URLS = ["url_xs", "url_sm", "url_md", "url_lg", "url"]

Instance Method Summary

Instance Method Detail

def admin_document_list(filter = BSON.new, *, sort = nil, projection = nil, hint : String | Hash | NamedTuple | Nil = nil, skip : Int32 | Nil = nil, limit : Int32 | Nil = nil, batch_size : Int32 | Nil = nil, single_batch : Bool | Nil = nil, comment : String | Nil = nil, max_time_ms : Int64 | Nil = nil, read_concern : Mongo::ReadConcern | Nil = nil, max = nil, min = nil, return_key : Bool | Nil = nil, show_record_id : Bool | Nil = nil, tailable : Bool | Nil = nil, oplog_replay : Bool | Nil = nil, no_cursor_timeout : Bool | Nil = nil, await_data : Bool | Nil = nil, allow_partial_results : Bool | Nil = nil, allow_disk_use : Bool | Nil = nil, collation : Mongo::Collation | Nil = nil, read_preference : Mongo::ReadPreference | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil, field_name_params_list : Hash(String, NamedTuple(type: String, group: UInt8))) : Array(Hash(String, DynFork::Globals::FieldValueTypes)) #

Get document list.


[View source]
def admin_document_to_hash(doc : BSON, field_name_params_list : Hash(String, NamedTuple(type: String, group: UInt8))) : Hash(String, DynFork::Globals::FieldValueTypes) #

Get clean data from a document, as a Hash object.


[View source]