module DynFork::QCommons

Overview

Commons - Model class methods.

Included Modules

Defined in:

dynfork/commons/commons.cr
dynfork/commons/unit.cr

Instance methods inherited from module DynFork::QCommons::Indexes

create_index(keys, *, options = NamedTuple.new, commit_quorum : Int32 | String | Nil = nil, max_time_ms : Int64 | Nil = nil, write_concern : Mongo::WriteConcern | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Commands::CreateIndexes::Result | Nil create_index, create_indexes(models : Array, *, commit_quorum : Int32 | String | Nil = nil, max_time_ms : Int64 | Nil = nil, write_concern : Mongo::WriteConcern | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Commands::CreateIndexes::Result | Nil create_indexes, drop_index(name : String, *, max_time_ms : Int64 | Nil = nil, write_concern : Mongo::WriteConcern | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Commands::Common::BaseResult | Nil drop_index, drop_indexes(*, max_time_ms : Int64 | Nil = nil, write_concern : Mongo::WriteConcern | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Commands::Common::BaseResult | Nil drop_indexes, list_indexes(session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Cursor | Nil list_indexes

Instance methods inherited from module DynFork::QCommons::One

delete_one(filter, *, collation : Mongo::Collation | Nil = nil, hint : String | Hash | NamedTuple | Nil = nil, ordered : Bool | Nil = nil, write_concern : Mongo::WriteConcern | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Commands::Common::DeleteResult | Nil delete_one, find_one_and_delete(filter, *, sort = nil, fields = nil, bypass_document_validation : Bool | Nil = nil, write_concern : Mongo::WriteConcern | Nil = nil, collation : Mongo::Collation | Nil = nil, hint : String | Hash | NamedTuple | Nil = nil, max_time_ms : Int64 | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : self | Nil find_one_and_delete, find_one_to_hash(filter = BSON.new, *, sort = nil, projection = nil, hint : String | Hash | NamedTuple | Nil = nil, skip : Int32 | 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, oplog_replay : Bool | Nil = nil, no_cursor_timeout : Bool | Nil = nil, allow_partial_results : Bool | Nil = nil, collation : Mongo::Collation | Nil = nil, read_preference : Mongo::ReadPreference | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Hash(String, DynFork::Globals::FieldValueTypes) | Nil find_one_to_hash, find_one_to_instance(filter = BSON.new, *, sort = nil, projection = nil, hint : String | Hash | NamedTuple | Nil = nil, skip : Int32 | 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, oplog_replay : Bool | Nil = nil, no_cursor_timeout : Bool | Nil = nil, allow_partial_results : Bool | Nil = nil, collation : Mongo::Collation | Nil = nil, read_preference : Mongo::ReadPreference | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : self | Nil find_one_to_instance, find_one_to_json(filter = BSON.new, *, sort = nil, projection = nil, hint : String | Hash | NamedTuple | Nil = nil, skip : Int32 | 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, oplog_replay : Bool | Nil = nil, no_cursor_timeout : Bool | Nil = nil, allow_partial_results : Bool | Nil = nil, collation : Mongo::Collation | Nil = nil, read_preference : Mongo::ReadPreference | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : String | Nil find_one_to_json

Instance methods inherited from module DynFork::QCommons::Many

delete_many(filter, *, collation : Mongo::Collation | Nil = nil, hint : String | Hash | NamedTuple | Nil = nil, ordered : Bool | Nil = nil, write_concern : Mongo::WriteConcern | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Commands::Common::DeleteResult | Nil delete_many, find_many_to_hash_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) : Array(Hash(String, DynFork::Globals::FieldValueTypes)) | Nil find_many_to_hash_list, find_many_to_json(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) : String | Nil find_many_to_json

Instance methods inherited from module DynFork::QCommons::General

aggregate(pipeline : Array, *, allow_disk_use : Bool | Nil = nil, batch_size : Int32 | Nil = nil, max_time_ms : Int64 | Nil = nil, bypass_document_validation : Bool | Nil = nil, collation : Mongo::Collation | Nil = nil, hint : String | Hash | NamedTuple | Nil = nil, comment : String | Nil = nil, read_concern : Mongo::ReadConcern | Nil = nil, write_concern : Mongo::WriteConcern | Nil = nil, read_preference : Mongo::ReadPreference | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Cursor | Nil aggregate, bulk(ordered : Bool = true, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Bulk bulk, bulk_write(requests : Array(Mongo::Bulk::WriteModel), *, ordered : Bool, bypass_document_validation : Bool | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Mongo::Bulk::WriteResult bulk_write, collection_name : Mongo::Collection::CollectionKey collection_name, count_documents(filter = BSON.new, *, skip : Int32 | Nil = nil, limit : Int32 | Nil = nil, collation : Mongo::Collation | Nil = nil, hint : String | Hash | NamedTuple | Nil = nil, max_time_ms : Int64 | Nil = nil, read_preference : Mongo::ReadPreference | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Int32 count_documents, distinct(key : String, *, filter = nil, read_concern : Mongo::ReadConcern | Nil = nil, collation : Mongo::Collation | Nil = nil, read_preference : Mongo::ReadPreference | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Array distinct, estimated_document_count(*, max_time_ms : Int64 | Nil = nil, read_preference : Mongo::ReadPreference | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : Int32 estimated_document_count, stats(*, scale : Int32 | Nil = nil, session : Mongo::Session::ClientSession | Nil = nil) : BSON | Nil stats

Instance methods inherited from module DynFork::QCommons::Converter

document_to_hash(doc_bson : BSON, field_name_params_list : Hash(String, NamedTuple(type: String, group: UInt8))) : Hash(String, DynFork::Globals::FieldValueTypes) document_to_hash

Instance methods inherited from module DynFork::QCommons::UnitsManagement

unit_manager(unit : DynFork::Globals::Unit) : Nil unit_manager