コード例 #1
0
 public static SqlWhereCollection SqlWhereExists(
     this SqlWhereCollection self,
     string clauseFormat,
     params string[] whereCollection)
 {
     return(self.Add(raw:
                     clauseFormat.Replace("#SqlWhere#", whereCollection.Join(" and "))));
 }
コード例 #2
0
        public static SqlWhereCollection SqlWhereLike(
            this SqlWhereCollection self,
            string searchText,
            params string[] clauseCollection)
        {
            var searchTextCollection = Sqls.SearchTextCollection(searchText);

            return(self.Add(
                       name: "SearchText",
                       value: searchTextCollection,
                       raw: "(@SearchText#ParamCount#_#CommandCount# = '' or (" +
                       clauseCollection.Join(" or ") + "))",
                       _using: searchTextCollection.Any()));
        }
コード例 #3
0
        public static SqlWhereCollection SqlWhereLike(
            this SqlWhereCollection self,
            string name,
            string searchText,
            List <string> clauseCollection)
        {
            var searchTextCollection = SearchTextCollection(searchText);

            return(self.Add(
                       name: name,
                       value: searchTextCollection,
                       raw: $"(@{name}#ParamCount#_#CommandCount# = '' or (" +
                       clauseCollection.Join(" or ") + "))",
                       _using: searchTextCollection.Any()));
        }
コード例 #4
0
ファイル: Sqls.cs プロジェクト: wagatsumaw/Implem.Pleasanter
        public static SqlWhereCollection SqlWhereLike(
            this SqlWhereCollection self,
            string tableName,
            string name,
            string searchText,
            List <string> clauseCollection)
        {
            var searchTextCollection = SearchTextCollection(searchText);

            return(self.Add(
                       tableName: tableName,
                       name: name,
                       value: searchTextCollection,
                       raw: $"({clauseCollection.Join(" or ")})",
                       _using: searchTextCollection.Any()));
        }