MCPcopy
hub / github.com/django/django / create_collation

Method create_collation

django/contrib/postgres/operations.py:197–211  ·  view source on GitHub ↗
(self, schema_editor)

Source from the content-addressed store, hash-verified

195 )
196
197 def create_collation(self, schema_editor):
198 args = {"locale": schema_editor.quote_name(self.locale)}
199 if self.provider != "libc":
200 args["provider"] = schema_editor.quote_name(self.provider)
201 if self.deterministic is False:
202 args["deterministic"] = "false"
203 schema_editor.execute(
204 "CREATE COLLATION %(name)s (%(args)s)"
205 % {
206 "name": schema_editor.quote_name(self.name),
207 "args": ", ".join(
208 f"{option}={value}" for option, value in args.items()
209 ),
210 }
211 )
212
213 def remove_collation(self, schema_editor):
214 schema_editor.execute(

Callers 2

database_forwardsMethod · 0.80
database_backwardsMethod · 0.80

Calls 4

quote_nameMethod · 0.45
executeMethod · 0.45
joinMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected