• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

torand / FasterSQL / 13591799490

28 Feb 2025 03:59PM UTC coverage: 65.237% (-1.3%) from 66.563%
13591799490

push

github

web-flow
Merge pull request #14 from torand/having-support

feat: supporting the HAVING clause + IS NULL operator now supports an…

214 of 408 branches covered (52.45%)

Branch coverage included in aggregate %.

273 of 389 new or added lines in 69 files covered. (70.18%)

3 existing lines in 3 files now uncovered.

1079 of 1574 relevant lines covered (68.55%)

3.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

14.81
/src/main/java/io/github/torand/fastersql/util/lang/StringHelper.java
1
/*
2
 * Copyright (c) 2024 Tore Eide Andersen
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package io.github.torand.fastersql.util.lang;
17

18
import static java.util.Objects.isNull;
19
import static java.util.Objects.nonNull;
20

21
public final class StringHelper {
22
    private StringHelper() {}
23

24
    public static boolean nonBlank(String string) {
25
        return nonNull(string) && !string.isEmpty();
10!
26
    }
27

28
    public static boolean isBlank(String string) {
UNCOV
29
        return isNull(string) || string.isEmpty();
×
30
    }
31

32
    public static String generate(String s, int count) {
33
        return s.repeat(count);
×
34
    }
35

36
    public static String generate(String s, int count, String delimiter) {
37
        StringBuilder b = new StringBuilder();
×
38
        for (int t = 0; t < count; t++) {
×
39
            if (t != 0) {
×
40
                b.append(delimiter);
×
41
            }
42
            b.append(s);
×
43
        }
44
        return b.toString();
×
45
    }
46

47
    public static String quote(String string) {
48
        return "\"" + string + "\"";
×
49
    }
50

51
    public static Object quoteIfString(Object value) {
52
        if (value instanceof String string) {
×
53
            return quote(string);
×
54
        }
55

56
        return value;
×
57
    }
58
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc