MCPcopy Create free account
hub / github.com/Vanderhoof/PyDBML / generate_comment_on

Function generate_comment_on

pydbml/renderer/sql/default/note.py:21–25  ·  view source on GitHub ↗

Generate a COMMENT ON clause out from this note.

(model: Note, entity: str, name: str)

Source from the content-addressed store, hash-verified

19
20
21def generate_comment_on(model: Note, entity: str, name: str) -> str:
22 """Generate a COMMENT ON clause out from this note."""
23 quoted_text = f"'{prepare_text_for_sql(model)}'"
24 note_sql = f'COMMENT ON {entity.upper()} "{name}" IS {quoted_text};'
25 return note_sql
26
27
28@DefaultSQLRenderer.renderer_for(Note)

Callers 2

test_generate_comment_onFunction · 0.90
render_noteFunction · 0.85

Calls 1

prepare_text_for_sqlFunction · 0.85

Tested by 1

test_generate_comment_onFunction · 0.72