Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A function that returns a []map[string]interface{} is incorrect for integer types #360

Open
richecr opened this issue Jul 20, 2024 · 0 comments

Comments

@richecr
Copy link
Contributor

richecr commented Jul 20, 2024

  • A function that returns a []map[string]interface{} is incorrect for integer types
func Test() ([]map[string]interface{}, error) {
	var result []map[string]interface{}
	rowMap := make(map[string]interface{})
	rowMap["id"] = 1
	rowMap["test"] = 2
	rowMap["name"] = "adadada"
	result = append(result, rowMap)
	return result, nil
}
print(test())
  • output:
pythonic.Slice_Map_string_interface_ len: 1 handle: 8 [pythonicsql.Map_string_interface_ len: 3 handle: 9 {id=%!s(int=1), test=%!s(int=2), name=adadada, }]

Integer types are returned in Python as a string %!s(int={value})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant