Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
olapy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
olapy
Commits
0d77a1c9
Commit
0d77a1c9
authored
Jun 01, 2017
by
mouadh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change to sqlalchemy
parent
71fe3e64
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
olapy/core/mdx/tools/connection.py
olapy/core/mdx/tools/connection.py
+3
-3
No files found.
olapy/core/mdx/tools/connection.py
View file @
0d77a1c9
import
psycopg2
as
pg
#
import psycopg2 as pg
from
sqlalchemy
import
create_engine
# postgres connection
...
...
@@ -29,8 +29,8 @@ class MyDB(object):
if
db
is
None
:
# first i want to show all databases to user (in excel)
self
.
engine
=
pg
.
connect
(
"user={0} password={1} host='{2}'"
.
format
(
username
,
password
,
host
))
#
self.engine = pg.connect("user={0} password={1} host='{2}'".
#
format(username, password, host))
self
.
engine
=
create_engine
(
'postgresql+psycopg2://{0}:{1}@{3}:{4}/{2}'
.
format
(
username
,
password
,
'postgres'
,
host
,
port
))
...
...
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