+# SPDX-License-Identifier: GPL-2.0-only
+#
+# This file is part of Nominatim. (https://nominatim.org)
+#
+# Copyright (C) 2022 by the Nominatim developer community.
+# For a full list of authors see the git log.
"""
Helper functions for handling DB accesses.
"""
# List of characters that need to be quoted for the copy command.
-_SQL_TRANSLATION = {ord(u'\\') : u'\\\\',
- ord(u'\t') : u'\\t',
- ord(u'\n') : u'\\n'}
+_SQL_TRANSLATION = {ord(u'\\'): u'\\\\',
+ ord(u'\t'): u'\\t',
+ ord(u'\n'): u'\\n'}
+
class CopyBuffer:
""" Data collector for the copy_from command.