sqlalchemy-iris 0.5.0b3__py3-none-any.whl → 0.6.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- intersystems_iris/_BufferReader.py +10 -0
- intersystems_iris/_BufferWriter.py +32 -0
- intersystems_iris/_ConnectionInformation.py +54 -0
- intersystems_iris/_ConnectionParameters.py +18 -0
- intersystems_iris/_Constant.py +38 -0
- intersystems_iris/_DBList.py +499 -0
- intersystems_iris/_Device.py +69 -0
- intersystems_iris/_GatewayContext.py +25 -0
- intersystems_iris/_GatewayException.py +4 -0
- intersystems_iris/_GatewayUtility.py +74 -0
- intersystems_iris/_IRIS.py +1294 -0
- intersystems_iris/_IRISConnection.py +516 -0
- intersystems_iris/_IRISEmbedded.py +85 -0
- intersystems_iris/_IRISGlobalNode.py +273 -0
- intersystems_iris/_IRISGlobalNodeView.py +25 -0
- intersystems_iris/_IRISIterator.py +143 -0
- intersystems_iris/_IRISList.py +360 -0
- intersystems_iris/_IRISNative.py +208 -0
- intersystems_iris/_IRISOREF.py +4 -0
- intersystems_iris/_IRISObject.py +424 -0
- intersystems_iris/_IRISReference.py +133 -0
- intersystems_iris/_InStream.py +149 -0
- intersystems_iris/_LegacyIterator.py +135 -0
- intersystems_iris/_ListItem.py +15 -0
- intersystems_iris/_ListReader.py +84 -0
- intersystems_iris/_ListWriter.py +157 -0
- intersystems_iris/_LogFileStream.py +115 -0
- intersystems_iris/_MessageHeader.py +51 -0
- intersystems_iris/_OutStream.py +25 -0
- intersystems_iris/_PrintStream.py +65 -0
- intersystems_iris/_PythonGateway.py +850 -0
- intersystems_iris/_SharedMemorySocket.py +87 -0
- intersystems_iris/__init__.py +79 -0
- intersystems_iris/__main__.py +7 -0
- intersystems_iris/dbapi/_Column.py +56 -0
- intersystems_iris/dbapi/_DBAPI.py +2295 -0
- intersystems_iris/dbapi/_Descriptor.py +46 -0
- intersystems_iris/dbapi/_IRISStream.py +63 -0
- intersystems_iris/dbapi/_Message.py +158 -0
- intersystems_iris/dbapi/_Parameter.py +138 -0
- intersystems_iris/dbapi/_ParameterCollection.py +133 -0
- intersystems_iris/dbapi/_ResultSetRow.py +314 -0
- intersystems_iris/dbapi/_SQLType.py +32 -0
- intersystems_iris/dbapi/__init__.py +0 -0
- intersystems_iris/dbapi/preparser/_PreParser.py +1658 -0
- intersystems_iris/dbapi/preparser/_Scanner.py +391 -0
- intersystems_iris/dbapi/preparser/_Token.py +81 -0
- intersystems_iris/dbapi/preparser/_TokenList.py +251 -0
- intersystems_iris/dbapi/preparser/__init__.py +0 -0
- intersystems_iris/pex/_BusinessHost.py +101 -0
- intersystems_iris/pex/_BusinessOperation.py +105 -0
- intersystems_iris/pex/_BusinessProcess.py +214 -0
- intersystems_iris/pex/_BusinessService.py +95 -0
- intersystems_iris/pex/_Common.py +228 -0
- intersystems_iris/pex/_Director.py +24 -0
- intersystems_iris/pex/_IRISBusinessOperation.py +5 -0
- intersystems_iris/pex/_IRISBusinessService.py +18 -0
- intersystems_iris/pex/_IRISInboundAdapter.py +5 -0
- intersystems_iris/pex/_IRISOutboundAdapter.py +17 -0
- intersystems_iris/pex/_InboundAdapter.py +57 -0
- intersystems_iris/pex/_Message.py +6 -0
- intersystems_iris/pex/_OutboundAdapter.py +46 -0
- intersystems_iris/pex/__init__.py +25 -0
- iris/__init__.py +25 -0
- iris/iris_site.py +13 -0
- iris/irisbuiltins.py +97 -0
- iris/irisloader.py +199 -0
- irisnative/_IRISNative.py +9 -0
- irisnative/__init__.py +10 -0
- {sqlalchemy_iris-0.5.0b3.dist-info → sqlalchemy_iris-0.6.0b1.dist-info}/METADATA +1 -1
- sqlalchemy_iris-0.6.0b1.dist-info/RECORD +83 -0
- sqlalchemy_iris-0.6.0b1.dist-info/top_level.txt +4 -0
- sqlalchemy_iris-0.5.0b3.dist-info/RECORD +0 -14
- sqlalchemy_iris-0.5.0b3.dist-info/top_level.txt +0 -1
- {sqlalchemy_iris-0.5.0b3.dist-info → sqlalchemy_iris-0.6.0b1.dist-info}/LICENSE +0 -0
- {sqlalchemy_iris-0.5.0b3.dist-info → sqlalchemy_iris-0.6.0b1.dist-info}/WHEEL +0 -0
- {sqlalchemy_iris-0.5.0b3.dist-info → sqlalchemy_iris-0.6.0b1.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
import base64
|
2
|
+
import getpass
|
3
|
+
import os
|
4
|
+
import platform
|
5
|
+
import socket
|
6
|
+
import struct
|
7
|
+
import sys
|
8
|
+
import threading
|
9
|
+
import intersystems_iris._SharedMemorySocket
|
10
|
+
import ssl
|
11
|
+
|
12
|
+
class _Device(object):
|
13
|
+
|
14
|
+
def __init__(self, _connection, _socket, _sslcontext = None):
|
15
|
+
_connection._device = self
|
16
|
+
self._connection = _connection
|
17
|
+
self._sslcontext = _sslcontext
|
18
|
+
if _socket is None:
|
19
|
+
self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
20
|
+
else:
|
21
|
+
self._socket = _socket
|
22
|
+
|
23
|
+
def close(self):
|
24
|
+
return self._socket.close()
|
25
|
+
|
26
|
+
def settimeout(self,time):
|
27
|
+
return self._socket.settimeout(time)
|
28
|
+
|
29
|
+
def connect(self, server_address):
|
30
|
+
if self._sslcontext is None:
|
31
|
+
return self._socket.connect(server_address)
|
32
|
+
else:
|
33
|
+
self._socket = self._sslcontext.wrap_socket(self._socket, server_hostname = server_address[0])
|
34
|
+
return self._socket.connect(server_address)
|
35
|
+
|
36
|
+
def sendall(self, buffer):
|
37
|
+
return self._socket.sendall(buffer)
|
38
|
+
|
39
|
+
def recv(self, len):
|
40
|
+
return self._socket.recv(len)
|
41
|
+
|
42
|
+
def gethostname(self):
|
43
|
+
return socket.gethostname()
|
44
|
+
|
45
|
+
def gethostbyname(self, hostname):
|
46
|
+
return socket.gethostbyname(hostname)
|
47
|
+
|
48
|
+
def is_sharedmemory(self):
|
49
|
+
return isinstance(self._socket, intersystems_iris._SharedMemorySocket._SharedMemorySocket)
|
50
|
+
|
51
|
+
def establishSHMSocket(self):
|
52
|
+
try:
|
53
|
+
iris_bin_dir = self._connection._connection_info._iris_install_dir
|
54
|
+
server_job_number = self._connection._connection_info._server_job_number
|
55
|
+
filename = b''
|
56
|
+
if self._connection._connection_params.hostname != None:
|
57
|
+
array = self._connection._connection_params.hostname.split("|")
|
58
|
+
filename = array[3] if len(array)>=4 else ""
|
59
|
+
filename = filename.upper()
|
60
|
+
filename = bytes(filename, "latin-1")
|
61
|
+
shmSocket = intersystems_iris._SharedMemorySocket._SharedMemorySocket(iris_bin_dir, server_job_number, filename)
|
62
|
+
shmSocket.connect()
|
63
|
+
self._socket.close()
|
64
|
+
self._socket = shmSocket
|
65
|
+
except BaseException as e:
|
66
|
+
try:
|
67
|
+
shmSocket.close()
|
68
|
+
except BaseException as e:
|
69
|
+
pass
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import threading
|
2
|
+
import intersystems_iris._IRIS
|
3
|
+
|
4
|
+
class _GatewayContext(object):
|
5
|
+
|
6
|
+
__thread_local_connection = {}
|
7
|
+
|
8
|
+
@classmethod
|
9
|
+
def _set_connection(cls, connection):
|
10
|
+
thread_id = threading.get_ident()
|
11
|
+
cls.__thread_local_connection[thread_id] = connection
|
12
|
+
|
13
|
+
@classmethod
|
14
|
+
def _get_connection(cls):
|
15
|
+
thread_id = threading.get_ident()
|
16
|
+
return cls.__thread_local_connection.get(thread_id)
|
17
|
+
|
18
|
+
@classmethod
|
19
|
+
def getConnection(cls):
|
20
|
+
return cls._get_connection()
|
21
|
+
|
22
|
+
@classmethod
|
23
|
+
def getIRIS(cls):
|
24
|
+
return intersystems_iris.IRIS(cls._get_connection())
|
25
|
+
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import inspect
|
2
|
+
import platform
|
3
|
+
import sys
|
4
|
+
import intersystems_iris._GatewayContext
|
5
|
+
|
6
|
+
class _GatewayUtility(object):
|
7
|
+
|
8
|
+
@staticmethod
|
9
|
+
def getLanguageName():
|
10
|
+
return "Python"
|
11
|
+
|
12
|
+
@staticmethod
|
13
|
+
def getLanguageVersion():
|
14
|
+
return platform.python_version()
|
15
|
+
|
16
|
+
@staticmethod
|
17
|
+
def writeOutput(data):
|
18
|
+
connection = intersystems_iris.GatewayContext.getConnection()
|
19
|
+
method_object = connection._output_redirect_handler
|
20
|
+
if method_object is None:
|
21
|
+
print(data, end="", flush=True)
|
22
|
+
else:
|
23
|
+
args = [ data ]
|
24
|
+
method_object(*args)
|
25
|
+
|
26
|
+
@classmethod
|
27
|
+
def dumpAllModules(cls, startswith = None):
|
28
|
+
if startswith is None: startswith = ""
|
29
|
+
lines = {}
|
30
|
+
gateway = intersystems_iris.GatewayContext.getConnection()._get_gateway()
|
31
|
+
cls._dumpOneModuleCollection(startswith, lines, sys.modules.copy())
|
32
|
+
cls._dumpOneModuleCollection(startswith, lines, gateway._thread_modules)
|
33
|
+
return "\r\n".join(sorted(lines.keys()))
|
34
|
+
|
35
|
+
@classmethod
|
36
|
+
def dumpSysModules(cls, startswith = None):
|
37
|
+
if startswith is None: startswith = ""
|
38
|
+
lines = {}
|
39
|
+
gateway = intersystems_iris.GatewayContext.getConnection()._get_gateway()
|
40
|
+
cls._dumpOneModuleCollection(startswith, lines, sys.modules.copy())
|
41
|
+
return "\r\n".join(sorted(lines.keys()))
|
42
|
+
|
43
|
+
@classmethod
|
44
|
+
def dumpThreadModules(cls, startswith = None):
|
45
|
+
if startswith is None: startswith = ""
|
46
|
+
lines = {}
|
47
|
+
gateway = intersystems_iris.GatewayContext.getConnection()._get_gateway()
|
48
|
+
cls._dumpOneModuleCollection(startswith, lines, gateway._thread_modules)
|
49
|
+
return "\r\n".join(sorted(lines.keys()))
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def dumpMethods(cls, class_name = None):
|
53
|
+
lines = {}
|
54
|
+
gateway = intersystems_iris.GatewayContext.getConnection()._get_gateway()
|
55
|
+
class_object = gateway._load_class(class_name)
|
56
|
+
methods = inspect.getmembers(class_object, inspect.isfunction)
|
57
|
+
for m in range(len(methods)):
|
58
|
+
lines[methods[m][0]] = ""
|
59
|
+
return "\r\n".join(sorted(lines.keys()))
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def _dumpOneModuleCollection(cls, startswith, lines, collection):
|
63
|
+
for module in collection.values():
|
64
|
+
module_name = module.__name__ + "."
|
65
|
+
if module_name.startswith(startswith): lines[module_name] = ""
|
66
|
+
try:
|
67
|
+
classes = inspect.getmembers(module, inspect.isclass)
|
68
|
+
for clazz in range(len(classes)):
|
69
|
+
class_name = module_name + classes[clazz][0]
|
70
|
+
if class_name.startswith(startswith): lines[class_name] = ""
|
71
|
+
except Exception as ex:
|
72
|
+
pass
|
73
|
+
return
|
74
|
+
|