Skip to content
New issue

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

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

Already on GitHub? # to your account

不支持 postgresql 的 date 字段格式时的类型转换 #436

Closed
transtone opened this issue Aug 29, 2022 · 1 comment
Closed

不支持 postgresql 的 date 字段格式时的类型转换 #436

transtone opened this issue Aug 29, 2022 · 1 comment

Comments

@transtone
Copy link
Contributor

transtone commented Aug 29, 2022

使用如下查询时出错:

{
	"data[]": {	
		"User": {        
			"birthday>=": "2022-08-28",
		},
        "format": true,
        "count": 3,
	},

}
org.postgresql.util.PSQLException: ERROR: operator does not exist: date >= character varying
  建议:No operator matches the given name and argument types. You might need to add explicit type casts.

==================

需要这样转换一下字段格式:

{
	"data[]": {	
		"User": {        
			"birthday>=": "2022-08-28",
                        "@cast": "birthday>=:DATE",
		},
        "format": true,
        "count": 3,
	},

}

Document.md 文档中查不到,可以补上这个功能的文档。

@transtone transtone changed the title 不支持 postgresql 的 date 字段格式搜索 不支持 postgresql 的 date 字段格式时的类型转换 Aug 30, 2022
@TommyLemon
Copy link
Collaborator

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants