Skip to content

Commit 885afad

Browse files
t8y8jacalata
authored andcommitted
Revert "adding oracle param support related to #137 (#149)" (#150)
This reverts commit 5d1a81e.
1 parent 7befcb4 commit 885afad

File tree

2 files changed

+1
-52
lines changed

2 files changed

+1
-52
lines changed

tableaudocumentapi/connection.py

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ def __init__(self, connxml):
1616
self._server = connxml.get('server')
1717
self._username = connxml.get('username')
1818
self._authentication = connxml.get('authentication')
19-
self._schema = connxml.get('schema')
20-
self._service = connxml.get('service')
2119
self._class = connxml.get('class')
2220
self._schema = connxml.get('schema')
2321
self._service = connxml.get('service')
@@ -30,7 +28,7 @@ def __repr__(self):
3028

3129
@classmethod
3230
def from_attributes(cls, server, dbname, username, dbclass, port=None, query_band=None,
33-
initial_sql=None, authentication='', schema='', service=''):
31+
initial_sql=None, authentication=''):
3432
"""Creates a new connection that can be added into a Data Source.
3533
defaults to `''` which will be treated as 'prompt' by Tableau."""
3634

@@ -39,8 +37,6 @@ def from_attributes(cls, server, dbname, username, dbclass, port=None, query_ban
3937
xml.server = server
4038
xml.dbname = dbname
4139
xml.username = username
42-
xml.schema = schema
43-
xml.service = service
4440
xml.dbclass = dbclass
4541
xml.port = port
4642
xml.query_band = query_band
@@ -212,43 +208,3 @@ def initial_sql(self, value):
212208
pass
213209
else:
214210
self._connectionXML.set('one-time-sql', value)
215-
216-
@property
217-
def schema(self):
218-
"""Database schema for the connection. Not the table name."""
219-
return self._schema
220-
221-
@schema.setter
222-
def schema(self, value):
223-
"""
224-
Set the connection's schema property.
225-
226-
Args:
227-
value: New name of the database schema. String.
228-
229-
Returns:
230-
Nothing.
231-
232-
"""
233-
self._schema = value
234-
self._connectionXML.set('schema', value)
235-
236-
@property
237-
def service(self):
238-
"""Database service for the connection. Not the table name."""
239-
return self._service
240-
241-
@service.setter
242-
def service(self, value):
243-
"""
244-
Set the connection's service property.
245-
246-
Args:
247-
value: New name of the database service. String.
248-
249-
Returns:
250-
Nothing.
251-
252-
"""
253-
self._service = value
254-
self._connectionXML.set('service', value)

test/bvt.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,6 @@ def test_can_create_connection_from_scratch(self):
112112
self.assertEqual(conn.dbclass, 'mysql')
113113
self.assertEqual(conn.authentication, 'd')
114114

115-
def test_can_create_oracle_connection_from_scratch(self):
116-
conn = Connection.from_attributes(
117-
server='a', dbname='b', username='c', dbclass='oracle', schema='d', service='e')
118-
self.assertEqual(conn.server, 'a')
119-
self.assertEqual(conn.schema, 'd')
120-
self.assertEqual(conn.service, 'e')
121-
122115
def test_can_create_datasource_from_connections(self):
123116
conn1 = Connection.from_attributes(
124117
server='a', dbname='b', username='c', dbclass='mysql', authentication='d')

0 commit comments

Comments
 (0)