mongodb-driver
▼
Project version
v1.5.2
v1.5.1
v1.5.0
v1.4.1
v1.4.0
v1.2.1
v1.2.0
v1.1.0
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v0.9.2
v0.9.1
v0.9.0
v0.9.0-rc.1
v0.9.0-rc.0
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.5
v0.6.4
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.7
v0.5.6
v0.5.5
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
Pages
Modules
Mix
Tasks
API Reference
Modules
Mix Tasks
The Elixir Driver for MongoDB
Features
Usage
Examples
How to use the Mongo.Stream?
mongodb_ecto
Data Representation
Preserve Document Key Order
Writing your own encoding info
Collections
Breaking changes
Using the Repo Module
Breaking changes
Logging
Telemetry
Network compression
Connection Pooling
Replica Sets
Migration
Auth Mechanisms
x509 and using a dedicated MongoDB Atlas server
AWS, TLS and Erlang SSL Ciphers
Timeout
Read Preferences
Change Streams
Indexes
Bulk Writes
GridFS
Transactions
Command Monitoring
Testing
Additional articles
Copyright and License
Changelog
1.5.2 (2025-02-11)
1.5.1 (2025-02-04)
1.5.0 (2024-09-20)
1.4.1 (2024-05-02)
1.4.0 (2024-02-10)
1.2.1 (2023-11-26)
1.2.0 (2023-08-30)
1.1.0 (2023-07-30)
1.0.3 (2023-05-13)
1.0.2 (2023-01-02)
1.0.1 (2022-12-17)
1.0.0 (2022-11-27)
0.9.3 (2022-10-14)
0.9.2 (2022-09-24)
0.9.1 (2022-05-27)
0.9.0 (2022-05-21)
0.8.4 (2022-03-09)
0.8.3 (2022-02-17)
0.8.2 (2022-02-03)
0.8.1 (2022-01-22)
0.8.0 (2021-11-07) (0.7.5 was not published)
0.7.4 (2021-06-21)
0.7.3 (2021-05-29)
0.7.2 (2021-05-19)
0.7.1 (2021-01-01)
0.7.0 (2020-04-17)
0.6.5 (2020-03-30)
0.6.4 (2020-01-24)
0.6.3 (2020-01-23)
0.6.2 (2019-11-15)
0.6.1 (2019-11-01)
0.6.0 (2019-09-18)
0.5.7 (2019-06-25)
0.5.6 (2019-06-14)
0.5.5 (2019-05-22)
0.5.4 (2019-05-21)
0.5.3 (2019-05-02)
0.5.2 (2019-05-01)
0.5.1 (2019-04-28)
0.4.8-dev
v0.4.7 (2018-09-13)
v0.4.6 (2018-05-20)
0.4.5 (2018-04-08)
0.4.4 (2018-02-09)
0.4.3 (2017-09-16)
0.4.2 (2017-08-28)
0.4.1 (2017-08-09)
0.4.0 (2017-06-07)
0.3.0 (2017-05-11)
0.2.1 (2017-05-08)
0.2.0 (2016-11-11)
0.1.1 (2015-12-17)
0.1.0 (2015-08-25)
LICENSE
BSON
Summary
Types
document/0
t/0
Functions
decode/1
encode/1
BSON.Binary
Summary
Types
t/0
BSON.Decimal128
Summary
Functions
decode/1
encode/1
BSON.JavaScript
Summary
Types
t/0
BSON.LongNumber
Summary
Types
t/0
BSON.ObjectId
Summary
Types
t/0
Functions
decode/1
decode!/1
do_get_timestamp/1
encode/1
encode!/1
get_timestamp/1
get_timestamp!/1
new/4
BSON.Regex
Summary
Types
t/0
BSON.Timestamp
Summary
Types
t/0
Functions
is_after/2
is_before/2
Mongo
Sections
Generic options
Read options
Write options
Summary
Types
collection/0
conn/0
cursor/0
result/1
result!/1
Functions
abort_transaction/1
abort_transaction/2
admin_command/2
aggregate/4
causal_consistency/3
child_spec/1
command/3
command!/3
count_documents/4
count_documents!/4
create/3
create_indexes/4
delete_many/4
delete_many!/4
delete_one/4
delete_one!/4
distinct/5
distinct!/5
drop_collection/3
drop_database/3
drop_index/4
estimated_document_count/3
estimated_document_count!/3
exec_hello/2
exec_hello/3
exec_more_to_come/2
find/4
find_one/4
find_one_and_delete/4
find_one_and_replace/5
find_one_and_update/5
get_session/1
insert_many/4
insert_many!/4
insert_one/4
insert_one!/4
issue_command/4
limits/1
list_index_names/3
list_indexes/3
object_id/0
ping/1
rename_collection/4
replace_one/5
replace_one!/5
retryable_reads/1
retryable_writes/2
show_collections/2
start_link/1
timestamp/1
transaction/3
update/4
update_many/5
update_many!/5
update_one/5
update_one!/5
uuid/0
uuid/1
uuid!/1
watch_collection/5
watch_db/4
wire_version/1
Mongo.BulkOps
Sections
Example
Summary
Types
bulk_op/0
Functions
get_delete_many/1
get_delete_one/1
get_insert_one/1
get_replace_one/3
get_update_many/3
get_update_one/3
Mongo.BulkWrite
Sections
Unordered bulk writes
Example:
Ordered bulk writes
Stream bulk writes
Example
Benchmark
Summary
Functions
write/3
Mongo.BulkWriteResult
Summary
Types
t/0
Functions
add/2
delete_result/2
empty/0
error/1
insert_result/3
reduce/1
reduce/2
update_result/5
Mongo.Collection
Sections
Dump and load function
Default and derived values
Key mapping
Collections
MongoDB example
ID generator
Example embeds_one
after_load/1 and before_dump/1 macros
Example embeds_many
Example timestamps
Summary
Types
t/0
Functions
__attribute__/4
__embeds_many__/5
__embeds_one__/4
__id__/2
__type__/1
add_id/3
add_name/3
after_load/1
attribute/3
before_dump/1
collection/2
compile_dump_steps/1
compile_load_steps/3
document/1
dump/1
dump/2
embeds_many/3
embeds_one/3
filter_nils/1
has_dump_function?/1
has_load_function?/1
struct_args/1
struct_args/2
timestamp/2
timestamps/1
timestamps/3
Mongo.DeleteResult
Summary
Types
t/0
Mongo.Encoder
Summary
Types
t/0
Functions
encode/1
Mongo.FindAndModifyResult
Summary
Types
t/0
Mongo.GridFs.Bucket
Summary
Types
t/0
Functions
add_session/2
check_and_chunks_files_index/1
check_and_create_files_index/1
chunks_collection_name/1
delete/2
drop/1
files_collection_name/1
find/3
find_one/2
index_member?/4
new/2
rename/3
Mongo.GridFs.Download
Summary
Types
result/0
Functions
find_and_stream/2
find_one_file/2
open_download_stream/2
Mongo.GridFs.Upload
Summary
Functions
open_upload_stream/4
Mongo.GridFs.UploadStream
Sections
Example:
Summary
Types
file_id/0
t/0
Functions
new/4
Mongo.InsertManyResult
Summary
Types
t/0
Mongo.InsertOneResult
Summary
Types
t/0
Mongo.Messages
Summary
Functions
decode_header/1
decode_msg/1
decode_reply/1
decode_response/2
decode_sections/1
decode_sections/2
decode_sequence/1
encode/2
msg_header/1
msg_header/2
op_msg/1
op_msg/2
op_msg_compressed/1
op_msg_compressed/2
op_query/1
op_query/2
op_reply/1
op_reply/2
payload/1
payload/2
section/1
section/2
sequence/1
sequence/2
Mongo.MongoDBConnection
Mongo.Monitor
Summary
Functions
child_spec/1
connected/3
force_check/1
get_state/1
info/1
init/1
modes/0
set_heartbeat_frequency_ms/2
start_link/1
stop_streaming_mode/1
terminate/2
Mongo.OrderedBulk
Sections
Example
Example
Summary
Types
t/0
Functions
delete_many/2
delete_one/2
empty?/1
insert_one/2
new/1
push/2
replace_one/4
update_many/4
update_one/4
write/5
Mongo.PBKDF2
Summary
Functions
generate/3
Mongo.PasswordSafe
Summary
Functions
child_spec/1
get_password/1
init/1
set_password/2
start_link/0
Mongo.Query
Mongo.ReadPreference
Sections
mode
Summary
Functions
add_read_preference/2
merge_defaults/1
to_mongos/1
to_replica_set/1
to_topology_single_type/1
Mongo.Repo
Sections
Read-only repositories
Summary
Types
t/0
Callbacks
aggregate/3
all/3
config/0
count/3
delete/2
delete!/2
delete_all/3
exists?/3
fetch/3
fetch_by/3
get/3
get_by/3
insert/2
insert!/2
insert_all/3
insert_or_update/2
insert_or_update!/2
stream/3
transaction/2
update/2
update!/2
update_all/4
Mongo.Session
Sections
Example
Convenient API for Transactions
Example
Implicit vs explicit sessions
Summary
Types
t/0
Functions
abort_transaction/1
advance_operation_time/2
alive?/1
bind_session/3
cast/2
commit_transaction/1
commit_transaction/2
connection/1
end_session/2
handle_call_event/3
handle_cast_event/3
in_read_session/3
in_session/5
in_write_session/3
init/6
mark_server_unknown/1
run_in_transaction/5
select_server/2
start_link/6
start_session/3
start_transaction/1
update_recovery_token/2
update_session/3
wire_version/1
with_transaction/3
Mongo.Session.ServerSession
Summary
Types
t/0
Functions
about_to_expire?/2
new/0
next_txn_num/1
set_last_use/1
Mongo.Session.SessionPool
Summary
Types
session_pool/0
Functions
checkin/2
checkout/1
new/2
Mongo.Stream
Summary
Functions
checkin_session/3
new/3
Mongo.StreamingHelloMonitor
Summary
Functions
child_spec/1
connected/2
handle_cast/2
info/1
init/1
start_link/1
terminate/2
Mongo.UnorderedBulk
Sections
Example
Example
Summary
Types
t/0
Functions
add/2
delete_many/2
delete_one/2
empty?/1
insert_one/2
new/1
push/2
replace_one/4
update_many/4
update_one/4
write/5
Mongo.UpdateResult
Summary
Types
t/0
Mongo.UrlParser
Summary
Functions
parse_url/1
Mongo.Version
Summary
Functions
decode/1
encode/1
Exceptions
Mongo.Error
Summary
Types
t/0
Functions
fail_command?/1
has_label/2
not_primary_no_secondary_ok?/1
not_primary_or_secondary?/1
not_writable_primary?/1
not_writable_primary_or_recovering?/2
should_retry_read/3
should_retry_write/3
Mongo.WriteError
Summary
Types
t/0
Functions
message/1
mix mongo
Sections
Creating your first migration
Configuration
mix mongo.drop
mix mongo.migrate
mix mongo.reset
mix mongo.unlock
Search documentation of mongodb-driver
Settings
View Source
BSON.Regex
(mongodb-driver v1.5.2)
Represents BSON Regex type
Summary
Types
t()
Types
Link to this type
t()
View Source
@type
t() :: %BSON.Regex{options:
binary
(), pattern:
binary
()}
×