Semantic-transact Reference
Topic | Details | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SQL Gramma | ||||||||||||||||||||||||||
Expression String | ||||||||||||||||||||||||||
Read (Query) API | ||||||||||||||||||||||||||
Expression String | ||||||||||||||||||||||||||
Wrie (Update / Insert / Delete) API | ||||||||||||||||||||||||||
Expression String | ||||||||||||||||||||||||||
Generating SQL | ||||||||||||||||||||||||||
How empty values are handled | ||||||||||||||||||||||||||
Note: This is a description of server side handling. If you want to know how to control empty handling from client, see client reference like js client. Do not confused with it. The client side normally running in different evironment, this leads to different empty value coding conventions.Semantic.transact tried to take those empty value as consistant as possible to database convensions. It take the empty values following the rules:
1. If there is no db column type available, then all empty value is taken as a text field. For test example, see test of empty values (@Test testEmptyVals()). |
Known Issues
Sql#condt(String) parsed predicate missing flowing single quote.
See test case TestTransc#testExprVals().
For code line
.where(Sql.condt("roleName = '%s'", "roleName-old'''")) // roleName = 'roleName-old'''We are expecting this:roleName = 'roleName-old'''But we got this:
// but we want 3 single quotes ("'"), the 2nd from right side should be replacedroleName = 'roleName-old''It's because of PredicateVisitor handled the wrong grammar?