In ibatishelper, I matched the Common Data Types in the database with the data types in the Java (C #) class, but this is only the most common correspondence, and may be missing, maybe it's the corresponding link you want. this release mainly adds the function of specifying mappings by yourself! In addition, I updated some small details such as the Case sensitivity of the generated file name, and added the sqlmapper class generation (I am mainly doing this for the convenience of internal staff development, so sqlmapper is added based on the framework of your company. You may not need it, but you can delete it)
In fact, this function has been completed in the last release, but it has not been released. I am afraid that it will be sent too frequently, and it will be annoying ~~~~
However, my colleagues in the company really need this function, so do I. so I wanted to wait for the release, and I forgot about it. I didn't think of it until another friend mentioned it today. Let's release it today.
After the last release, many of my friends sent me emails.Source codeI hope to see a better design. After all, my level is limited. If you have a better design, please give me a copy.CodeIf you have other requirements, can you tell me if you are willing to benefit yourself?
Okay, you don't have to talk about it anymore.
As follows:/files/Suyuan/ibatishelperupdate .rar
Previous versions
Http://www.cnblogs.com/suyuan/archive/2008/12/16/1355891.html
Some may be unfamiliar with the velocity syntax and ask me how to write the insert statement.
If you want to insert an SQL statement, insert the following code at the corresponding position of the template file:
< Insert ID = "Insert $ {table }" Parameterclass = "$ {Table }" >
Insert into $ {table}
(
# Foreach ($ item in $ List)
# If ($ velocitycount = $ list. Count ())
$ {Item. Name. tolower ()}
# Else
$ {Item. Name. tolower ()},
# End
# End
)
Values
(
# Foreach ($ item in $ List)
# If ($ velocitycount = $ list. Count ())
# $ {Item. Name. tolower ()}#
# Else
#$ {Item. Name. tolower ()}#,
# End
# End
)
</ Insert > Update code is similar to the above writing what is wrong Please mail suyuan19@qq.com
Update:
The project generates JavaBean. If you want to generate a C # bean, you can modify the bean template file. Here I have written a C # bean template.
Using System;
Using System. Collections. Generic;
Using System. text;
Namespace $ {Package}
{
Public Class $ {Table}
{
# Foreach ($ Item In $ List)
Private $ Item. Type $ {item. Name. tolower ()};
# End
# Foreach ($ Item In $ List)
Public $ Item. Type $ {item. name}
{
Get { Return $ {Item. Name. tolower ()};}
Set { This . $ {Item. Name. tolower ()} = Value ;}
}
# End
}
}