Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mongiris
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Duchateau Fabien
mongiris
Commits
4760aa53
Commit
4760aa53
authored
4 years ago
by
Duchateau Fabien
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.liris.cnrs.fr/fduchate/mongiris
parents
31f6fce9
fbe32eed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mongiris/api.py
+14
-0
14 additions, 0 deletions
mongiris/api.py
with
14 additions
and
0 deletions
mongiris/api.py
+
14
−
0
View file @
4760aa53
...
...
@@ -133,6 +133,20 @@ class Mongiris:
doc
=
collection
.
find_one
(
json_query
)
doc_json
=
Mongiris
.
bson_to_json
(
doc
)
return
doc_json
def
find_all
(
self
,
collection
):
"""
Finds all documents in the given collection.
Args:
collection: a string representing the collection name
Returns:
doc_json: a dictionnary representing the documents, or None
"""
doc
=
collection
.
find
()
doc_json
=
Mongiris
.
bson_to_json
(
doc
)
return
doc_json
def
find_all
(
self
,
collection
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment