MCPcopy
hub / github.com/django/django / _database_exists

Method _database_exists

django/db/backends/postgresql/creation.py:33–38  ·  view source on GitHub ↗
(self, cursor, database_name)

Source from the content-addressed store, hash-verified

31 )
32
33 def _database_exists(self, cursor, database_name):
34 cursor.execute(
35 "SELECT 1 FROM pg_catalog.pg_database WHERE datname = %s",
36 [strip_quotes(database_name)],
37 )
38 return cursor.fetchone() is not None
39
40 def _execute_create_test_db(self, cursor, parameters, keepdb=False):
41 try:

Callers 1

Calls 2

strip_quotesFunction · 0.90
executeMethod · 0.45

Tested by

no test coverage detected