mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-04-11 18:33:52 +00:00
feat(reflection): add JSON to DB column name mapping functions
* Implement BuildJSONToDBColumnMap for translating JSON keys to DB column names * Enhance GetColumnName to extract column names with priority * Update filterValidFields to utilize new mapping for improved data handling * Fix TestToSnakeCase expected values for consistency
This commit is contained in:
@@ -823,12 +823,12 @@ func TestToSnakeCase(t *testing.T) {
|
||||
{
|
||||
name: "UserID",
|
||||
input: "UserID",
|
||||
expected: "user_i_d",
|
||||
expected: "user_id",
|
||||
},
|
||||
{
|
||||
name: "HTTPServer",
|
||||
input: "HTTPServer",
|
||||
expected: "h_t_t_p_server",
|
||||
expected: "http_server",
|
||||
},
|
||||
{
|
||||
name: "lowercase",
|
||||
@@ -838,7 +838,7 @@ func TestToSnakeCase(t *testing.T) {
|
||||
{
|
||||
name: "UPPERCASE",
|
||||
input: "UPPERCASE",
|
||||
expected: "u_p_p_e_r_c_a_s_e",
|
||||
expected: "uppercase",
|
||||
},
|
||||
{
|
||||
name: "Single",
|
||||
|
||||
Reference in New Issue
Block a user