Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PostgreSQL_CRUD
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
vidya.m
PostgreSQL_CRUD
Commits
2a79bd71
Commit
2a79bd71
authored
Mar 27, 2023
by
vidya.m
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pos_agg.py
parent
fcaf3309
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
scripts/core/handler/pos_agg.py
scripts/core/handler/pos_agg.py
+13
-9
No files found.
scripts/core/handler/pos_agg.py
View file @
2a79bd71
...
@@ -60,15 +60,19 @@ class PostgreSQL:
...
@@ -60,15 +60,19 @@ class PostgreSQL:
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
,
"failed to update the data"
)
print
(
e
,
"failed to update the data"
)
@
staticmethod
@
staticmethod
def
fetch_data
():
def
fetch_data
():
try
:
try
:
student_data
=
session
.
query
(
student
)
.
all
()
fetch_data
=
SqlUtility
.
fetch_file
()
list_
=
[]
header_label
=
[
" "
.
join
(
col
.
split
(
"_"
))
.
title
()
for
col
in
student
.
__table__
.
columns
.
keys
()]
for
data
in
student_data
:
header_value
=
list
(
student
.
__table__
.
columns
.
keys
())
list_
.
append
(
{
"student_id"
:
data
.
student_id
,
"student_name"
:
data
.
student_name
,
"desciption"
:
data
.
description
,
header
=
[{
"label"
:
label
,
"value"
:
value
}
for
label
,
value
in
zip
(
header_label
,
header_value
)]
"address"
:
data
.
address
})
return
list_
response
=
{
"header"
:
header
,
"body content"
:
fetch_data
}
return
response
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
,
"
Failed to F
ind the data"
)
print
(
e
,
"
failed to f
ind the data"
)
\ No newline at end of file
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