Class QuotedName
source code
object --+
|
QuotedName
A string-like thing basically representing SQL delimited
identifiers.
This has some features that make handling these relatively painless in
ADQL code.
The most horrible feature is that these hash and compare as their
embedded names, except to other QuotedNamess.
SQL-92, in 5.2, roughly says:
delimited identifiers compare literally with each other, delimited
identifiers compare with regular identifiers after the latter are all
turned to upper case. But since postgres turns everything to lower case,
we do so here, too.
>>> n1, n2, n3 = QuotedName("foo"), QuotedName('foo"l'), QuotedName("foo")
>>> n1==n2,n1==n3,hash(n1)==hash("foo")
(False, True, True)
>>> print n1, n2
"foo" "foo""l"
|
__init__(self,
name)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__providedBy__(...)
Object Specification Descriptor |
source code
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
Inherited from object :
__class__
|
x.__init__(...) initializes x; see help(type(x)) for signature
- Overrides:
object.__init__
- (inherited documentation)
|
hash(x)
- Overrides:
object.__hash__
- (inherited documentation)
|
__str__(self)
(Informal representation operator)
| source code
|
str(x)
- Overrides:
object.__str__
- (inherited documentation)
|
repr(x)
- Overrides:
object.__repr__
- (inherited documentation)
|
Special descriptor for class __provides__
The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.
|
__implemented__
- Value:
<implementedBy gavo.utils.misctricks.QuotedName>
|
|