Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
Login
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kranthi.kumar
Login
Commits
4b572b63
Commit
4b572b63
authored
Jan 28, 2021
by
kranthi.kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete utility.py
parent
012521cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
scripts/handler/utility.py
scripts/handler/utility.py
+0
-33
No files found.
scripts/handler/utility.py
deleted
100644 → 0
View file @
012521cb
import
logging
from
pymongo
import
MongoClient
class
Mongo_utility
:
@
staticmethod
def
connection
():
try
:
client
=
MongoClient
(
'143.110.191.155'
,
37217
)
database
=
client
.
kranthi
register_details
=
database
.
register_details
return
register_details
except
Exception
:
logging
.
exception
(
"Exception occurred in connection"
,
exc_info
=
True
)
@
staticmethod
def
insert
(
register_details
,
data
):
try
:
# we can use insert_many for insertion all records at a time.
register_details
.
insert
(
data
)
except
Exception
:
logging
.
exception
(
"Exception occurred"
,
exc_info
=
True
)
@
staticmethod
def
finding
(
register_details
,
query
):
try
:
details
=
register_details
.
find
(
query
)
return
details
except
Exception
:
logging
.
exception
(
"Exception occurred"
,
exc_info
=
True
)
raise
Exception
(
"Problem in Searching"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment