Skip to content

Commit c1f07e7

Browse files
authored
Revert "adding oracle param support related to tableau#137 (tableau#149)" (tableau#150)
This reverts commit 5d1a81e.
1 parent 5d1a81e commit c1f07e7

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._port = connxml.get('port', None)
2321
self._query_band = connxml.get('query-band-spec', None)
@@ -28,7 +26,7 @@ def __repr__(self):
2826

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

@@ -37,8 +35,6 @@ def from_attributes(cls, server, dbname, username, dbclass, port=None, query_ban
3735
xml.server = server
3836
xml.dbname = dbname
3937
xml.username = username
40-
xml.schema = schema
41-
xml.service = service
4238
xml.dbclass = dbclass
4339
xml.port = port
4440
xml.query_band = query_band
@@ -210,43 +206,3 @@ def initial_sql(self, value):
210206
pass
211207
else:
212208
self._connectionXML.set('one-time-sql', value)
213-
214-
@property
215-
def schema(self):
216-
"""Database schema for the connection. Not the table name."""
217-
return self._schema
218-
219-
@schema.setter
220-
def schema(self, value):
221-
"""
222-
Set the connection's schema property.
223-
224-
Args:
225-
value: New name of the database schema. String.
226-
227-
Returns:
228-
Nothing.
229-
230-
"""
231-
self._schema = value
232-
self._connectionXML.set('schema', value)
233-
234-
@property
235-
def service(self):
236-
"""Database service for the connection. Not the table name."""
237-
return self._service
238-
239-
@service.setter
240-
def service(self, value):
241-
"""
242-
Set the connection's service property.
243-
244-
Args:
245-
value: New name of the database service. String.
246-
247-
Returns:
248-
Nothing.
249-
250-
"""
251-
self._service = value
252-
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy