Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: DataMapper 3.0
    • Fix Version/s: DataMapper 3.0
    • Component/s: DataMapper
    • Labels:
      None

      Description

      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
      }

        Activity

        Gilles Bayon made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Gilles Bayon added a comment -

        in SVN

        Show
        Gilles Bayon added a comment - in SVN
        Gilles Bayon created issue -

          People

          • Assignee:
            Gilles Bayon
            Reporter:
            Gilles Bayon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development