MCPcopy Index your code
hub / github.com/catherinedevlin/ipython-sql / get

Method get

src/sql/connection.py:24–37  ·  view source on GitHub ↗
(cls, descriptor)

Source from the content-addressed store, hash-verified

22 Connection.current = self
23 @classmethod
24 def get(cls, descriptor):
25 if isinstance(descriptor, Connection):
26 cls.current = descriptor
27 elif descriptor:
28 conn = cls.connections.get(descriptor) or \
29 cls.connections.get(descriptor.lower())
30 if conn:
31 cls.current = conn
32 else:
33 cls.current = Connection(descriptor)
34 if cls.current:
35 return cls.current
36 else:
37 raise Exception(cls.tell_format())
38 @classmethod
39 def assign_name(cls, engine):
40 core_name = '%s@%s' % (engine.url.username, engine.url.database)

Callers 2

csvMethod · 0.80
executeMethod · 0.80

Calls 2

ConnectionClass · 0.85
tell_formatMethod · 0.80

Tested by

no test coverage detected