[
https://issues.apache.org/jira/browse/IBATISNET-268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gilles Bayon closed IBATISNET-268.
----------------------------------
Resolution: Fixed
in SVN
> Add support to Dynamic SQL via code
> -----------------------------------
>
> Key: IBATISNET-268
> URL: https://issues.apache.org/jira/browse/IBATISNET-268
> Project: iBatis for .NET
> Issue Type: New Feature
> Components: DataMapper
> Affects Versions: DataMapper 3.0
> Reporter: Gilles Bayon
> Assignee: Gilles Bayon
> Fix For: DataMapper 3.0
>
>
> Add attribute sqlSource on statement tag, a type alias to a user class which
> implement interface ISqlSource
> Sample
> ======
> <select id="SqlSourceWithInlineParameter" parameterClass="Integer"
> sqlSource="SqlSourceWithInlineParameter" resultMap="account-result"/>
> public class SqlSourceWithInlineParameter : ISqlSource
> {
> #region ISqlSource Members
> /// <summary>
> /// Gets the SQL text.
> /// </summary>
> /// <param name="mappedStatement">The mapped statement.</param>
> /// <param name="parameterObject">The parameter object.</param>
> /// <returns></returns>
> public string GetSql(IMappedStatement mappedStatement, object
> parameterObject)
> {
> return "select * from Accounts where Account_ID = @{Id}";
> }
> #endregion
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.