This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT tables.table_name | |
FROM information_schema.tables as tables | |
LEFT JOIN( | |
SELECT t.table_name, | |
c.column_name, | |
c.is_nullable, | |
c.data_type | |
FROM information_schema.tables AS t | |
join information_schema.columns AS c ON c.table_name = t.table_name | |
WHERE t.table_schema = 'public' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def name_to_slug(name:str) -> str: | |
import unicodedata | |
lower_cased_name = name.lower() | |
# replaces spacews by "-" | |
hyphened_name = '-'.join(lower_cased_name.split()) | |
# eliminates apostrophe | |
no_apost_name = ''.join(hyphened_name.split("'")) | |
# eliminates accentuation marks and ñ | |
# This part info: https://note.nkmk.me/en/python-split-rsplit-splitlines-re/ | |
# https://stackoverflow.com/questions/517923/what-is-the-best-way-to-remove-accents-normalize-in-a-python-unicode-string |