Skip to content

Commit 352f587

Browse files
authored
Merge pull request #41 from belchior/mysql-delete
Adds Mysql syntax to Delete builder
2 parents bece121 + 9dd21e0 commit 352f587

17 files changed

+1622
-248
lines changed

scripts/coverage_test.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Prerequisites
44
# cargo install rustfilt cargo-binutils
55
# rustup component add llvm-tools-preview
6+
clear
67

78
PKG_NAME="$(grep 'name\s*=\s*"' Cargo.toml | sed -E 's/.*"(.*)"/\1/')"
89
COVERAGE_OUTPUT="coverage"
@@ -11,11 +12,25 @@ COVERAGE_TARGET="target/coverage"
1112
rm -fr "$COVERAGE_TARGET"
1213
mkdir -p "$COVERAGE_OUTPUT"
1314
mkdir -p "$COVERAGE_TARGET"
14-
clear
1515

16+
echo "\n-- ------------------------------------------------------------------------------"
17+
echo "-- Testing SQL Standard"
18+
echo "-- ------------------------------------------------------------------------------\n"
1619
RUSTFLAGS="-C instrument-coverage" LLVM_PROFILE_FILE="$COVERAGE_TARGET/$PKG_NAME-%m.profraw" cargo test --target-dir $COVERAGE_TARGET;
20+
21+
echo "\n-- ------------------------------------------------------------------------------"
22+
echo "-- Testing PostgreSQL syntax"
23+
echo "-- ------------------------------------------------------------------------------\n"
1724
RUSTFLAGS="-C instrument-coverage" LLVM_PROFILE_FILE="$COVERAGE_TARGET/$PKG_NAME-%m.profraw" cargo test --target-dir $COVERAGE_TARGET --features postgresql;
25+
26+
echo "\n-- ------------------------------------------------------------------------------"
27+
echo "-- Testing SQLite syntax"
28+
echo "-- ------------------------------------------------------------------------------\n"
1829
RUSTFLAGS="-C instrument-coverage" LLVM_PROFILE_FILE="$COVERAGE_TARGET/$PKG_NAME-%m.profraw" cargo test --target-dir $COVERAGE_TARGET --features sqlite;
30+
31+
echo "\n-- ------------------------------------------------------------------------------"
32+
echo "-- Testing MySQL syntax"
33+
echo "-- ------------------------------------------------------------------------------\n"
1934
RUSTFLAGS="-C instrument-coverage" LLVM_PROFILE_FILE="$COVERAGE_TARGET/$PKG_NAME-%m.profraw" cargo test --target-dir $COVERAGE_TARGET --features mysql;
2035

2136
cargo profdata -- merge -sparse $COVERAGE_TARGET/$PKG_NAME-*.profraw -o $COVERAGE_TARGET/$PKG_NAME.profdata;

scripts/test.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
#!/bin/sh
22

3-
test_names=$(git status -s | grep tests/ | sed -e 's/.* //' -e 's/tests\//--test /' -e 's/\.rs//' | tr '\n' ' ')
3+
test_names=$(git status -s | grep 'A tests/\|M tests/' | sed -e 's/.* //' -e 's/tests\//--test /' -e 's/\.rs//' | tr '\n' ' ')
44

55
clear
6+
echo "\n-- ------------------------------------------------------------------------------"
7+
echo "-- Testing SQL Standard"
8+
echo "-- ------------------------------------------------------------------------------\n"
69
cargo test $test_names
10+
11+
echo "\n-- ------------------------------------------------------------------------------"
12+
echo "-- Testing PostgreSQL syntax"
13+
echo "-- ------------------------------------------------------------------------------\n"
714
cargo test $test_names --features postgresql
15+
16+
echo "\n-- ------------------------------------------------------------------------------"
17+
echo "-- Testing SQLite syntax"
18+
echo "-- ------------------------------------------------------------------------------\n"
819
cargo test $test_names --features sqlite
20+
21+
echo "\n-- ------------------------------------------------------------------------------"
22+
echo "-- Testing MySQL syntax"
23+
echo "-- ------------------------------------------------------------------------------\n"
924
cargo test $test_names --features mysql
1025

1126
# run only one test

scripts/watch_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
all_features='postgresql sqlite mysql'
1212
features=''
13-
test_names=$(git status -s | grep tests/ | sed -e 's/.* //' -e 's/tests\//--test /' -e 's/\.rs//' | tr '\n' ' ')
13+
test_names=$(git status -s | grep 'A tests/\|M tests/' | sed -e 's/.* //' -e 's/tests\//--test /' -e 's/\.rs//' | tr '\n' ' ')
1414

1515
case "$@" in
1616
"") features="";;

src/concat/non_standard.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[cfg(any(feature = "postgresql", feature = "sqlite", feature = "mysql"))]
22
use crate::{behavior::WithQuery, concat::concat_raw_before_after, fmt};
33

4-
#[cfg(any(feature = "postgresql", feature = "sqlite"))]
4+
#[cfg(any(feature = "postgresql", feature = "sqlite", feature = "mysql"))]
55
pub(crate) trait ConcatLimit<Clause: PartialEq> {
66
fn concat_limit(
77
&self,

0 commit comments

Comments
 (0)