File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
source/includes/usage-examples Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 44 gem 'mongo'
55end
66
7- Mongo ::Client . new ( uri ) do |client |
87
98 # start-create
10- client = Mongo ::Client . new ( [ '<connection string>' ] , database : 'weather' )
9+ client = Mongo ::Client . new ( '<connection string>' , database : 'weather' )
1110 collection_name = 'october2024'
1211
1312 time_series_options = { timeField : 'timestamp' }
1413 database = client . database
1514 database . command (
16- create : collection_name ,
17- timeseries : time_series_options
15+ create : collection_name ,
16+ timeseries : time_series_options
1817 )
1918 # end-create
2019
2423 # end-correct
2524
2625 # start-insert
27- client = Mongo ::Client . new ( [ '<connection string>' ] , : database => 'your_db' )
26+ client = Mongo ::Client . new ( '<connection string>' , database => 'your_db' )
2827 collection = client [ :october2024 ]
2928
3029 document_list = [
You can’t perform that action at this time.
0 commit comments