| 455 | |
| 456 | @staticmethod |
| 457 | def qtIdent(conn, *args): |
| 458 | # We're not using the conn object at the moment, but - we will |
| 459 | # modify the logic to use the server version specific keywords later. |
| 460 | res = None |
| 461 | value = None |
| 462 | |
| 463 | for val in args: |
| 464 | if isinstance(val, list): |
| 465 | return map(lambda w: Driver.qtIdent(conn, w), val) |
| 466 | |
| 467 | # DataType doesn't have len function then convert it to string |
| 468 | if not hasattr(val, '__len__'): |
| 469 | val = str(val) |
| 470 | |
| 471 | if len(val) == 0: |
| 472 | continue |
| 473 | |
| 474 | value = val |
| 475 | |
| 476 | if Driver.needsQuoting(val, False): |
| 477 | value = value.replace("\"", "\"\"") |
| 478 | value = "\"" + value + "\"" |
| 479 | |
| 480 | res = ((res and res + '.') or '') + value |
| 481 | |
| 482 | return res |