We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在columnConfigure给指定的属性设置指定值时支持条件判断,如下面代码
MapClientInsertable<Map<String, Object>> mapMapClientInsertable = client.mapInsertable(values) .asTable(tableName) .columnConfigure(c -> c.column(shapeName, "ST_GeomFromText({0}, " + wkid + ")", (context, parameter) -> { //"GEOMETRYCOLLECTION EMPTY" context.value(parameter); }));
但shapeName的值为空时 ,其sqlSegment要使用 "GEOMETRYCOLLECTION EMPTY" (表示空图形) 不为空时,使用 "ST_GeomFromText({0}, 4490)" ,{0} 指实际的值, 如值为 POLYGON ((118.39720 22.90420, 118.40720 22.90420, 118.40720 22.91420, 118.39720 22.91420, 118.39720 22.90420)) 则解析后的sqlSegment 为 "ST_GeomFromText( ' POLYGON ((118.39720 22.90420, 118.40720 22.90420, 118.40720 22.91420, 118.39720 22.91420, 118.39720 22.90420)) ' , 4490)"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在columnConfigure给指定的属性设置指定值时支持条件判断,如下面代码
MapClientInsertable<Map<String, Object>> mapMapClientInsertable = client.mapInsertable(values)
.asTable(tableName)
.columnConfigure(c -> c.column(shapeName, "ST_GeomFromText({0}, " + wkid + ")", (context, parameter) -> {
//"GEOMETRYCOLLECTION EMPTY"
context.value(parameter);
}));
但shapeName的值为空时 ,其sqlSegment要使用 "GEOMETRYCOLLECTION EMPTY" (表示空图形)
不为空时,使用 "ST_GeomFromText({0}, 4490)" ,{0} 指实际的值,
如值为 POLYGON ((118.39720 22.90420, 118.40720 22.90420, 118.40720 22.91420, 118.39720 22.91420, 118.39720 22.90420))
则解析后的sqlSegment 为 "ST_GeomFromText( ' POLYGON ((118.39720 22.90420, 118.40720 22.90420, 118.40720 22.91420, 118.39720 22.91420, 118.39720 22.90420)) ' , 4490)"
The text was updated successfully, but these errors were encountered: