GitHub user VampireAchao edited a comment on the discussion: StreamPark 
code-style-and-quality Improve

The naming conventions are quite mixed up, the priority for variable names is 
to use nouns, and the priority for method names is to start with a verb.

For the db layer (non-service layer), the basic CRUD operations like getBy, 
selectBy, queryBy, etc., are now standardized according to 
com.baomidou.mybatisplus.core.mapper.BaseMapper:
- For querying records, use "select" as a prefix, like selectById, selectByXxx, 
selectPageByXxx.
- For database UPDATE operations, use "update" as a prefix.
- For database INSERT operations, use "insert" as a prefix.
- For database DELETE operations, use "delete" as a prefix.

For the service layer, basic CRUD operations are named according to 
com.baomidou.mybatisplus.extension.service.IService:
- For querying multiple records, use "list" as a prefix, like listByIds, 
listByXxx.
- For querying single records, use "get" as a prefix, like getByName, getOne.
- For database UPDATE operations, use "update" as a prefix.
- For database INSERT operations, use "save" as a prefix.
- For database DELETE operations, use "remove" as a prefix.

GitHub link: 
https://github.com/apache/incubator-streampark/discussions/2915#discussioncomment-6623974

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to