for @hoegaarden 's sample "SOME_wired_SNAKE___CaSe" (it needs to be in double quotes in query or else postgresql will lowercase it ) you need a bit longer regex: "SOME_wired_SNAKE___CaSe".toLowerCase().replace(/+([a-z]|$)/g, function(, c) { return c.toUpperCase(); }); '...
-camel_to_snake: convert the object name (table, column, index...) from CamelCase to snake_case. Only do this if you are willing to change all your queries (or you use an ORM for instance). -col_map_file: specifies an output text file containing SQL-Server and PostgreSQL schemas, ...
strings.camelcase("PostgreSQL adapter", acronyms: ["PostgreSQL"]) # => "PostgreSQLAdapter"2.3 constcaseUse the constcase method to convert a string into a constant case. It will uppercase all words and separate them with an underscore _. For example:strings.constcase("PostgreSQL adapter") #...
toUpperCamelCaseUsersUsers toSnakeCaseUsersusers Table Name: registration_source Model Naming FormatGenerated Struct Name {{.}}registration_source Struct{{.}}Structregistration_source Struct{{ singular .}}Structregistration_source Struct{{ toLowerCamelCase .}}Structregistration_source ...
Usage of tables-to-go: -? shows help and usage -d string database name (default "postgres") -f force; skip tables that encounter errors -fn-format value format of the filename: camelCase (c, default) or snake_case (s) (default c) -format value format of struct fields (columns):...