Skip to content

Commit 9fafb50

Browse files
authored
Merge pull request #17 from wangfenjin/timestamp
impl date32 and timestamp
2 parents 0483c48 + 1f60a34 commit 9fafb50

File tree

13 files changed

+990
-289
lines changed

13 files changed

+990
-289
lines changed

.github/workflows/rust.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
targets: ${{ matrix.target }}
3737
components: 'rustfmt, clippy'
3838
- run: cargo fmt --all -- --check
39-
- run: cargo clippy --all-targets --workspace --features bundled -- -D warnings -A clippy::redundant-closure
39+
- run: cargo clippy --all-targets --workspace --features bundled --features modern-full -- -D warnings -A clippy::redundant-closure
4040
- name: Run cargo-tarpaulin
4141
uses: actions-rs/[email protected]
4242
with:
4343
# Intentionally omit time feature until we're on time 0.3, at which
4444
# point it should be added to `bundled-full`.
45-
args: '--features "bundled" --avoid-cfg-tarpaulin' # TODO restore to normal (https://github.com/xd009642/tarpaulin/issues/756#issuecomment-838769320)
45+
args: '--features "bundled" --features "modern-full" --avoid-cfg-tarpaulin' # TODO restore to normal (https://github.com/xd009642/tarpaulin/issues/756#issuecomment-838769320)
4646
- name: Upload to codecov.io
4747
uses: codecov/codecov-action@v1
4848

@@ -67,4 +67,4 @@ jobs:
6767
# leak sanitization, but we don't care about backtraces here, so long
6868
# as the other tests have them.
6969
RUST_BACKTRACE: "0"
70-
run: cargo -Z build-std test --features 'bundled' --target x86_64-unknown-linux-gnu
70+
run: cargo -Z build-std test --features 'bundled' --features 'modern-full' --target x86_64-unknown-linux-gnu

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ name = "duckdb"
2121
members = ["libduckdb-sys"]
2222

2323
[features]
24+
default = ["modern-full"]
2425
bundled = ["libduckdb-sys/bundled"]
2526
buildtime_bindgen = ["libduckdb-sys/buildtime_bindgen"]
26-
default = []
27+
modern-full = [
28+
"chrono",
29+
]
2730

2831
[dependencies]
2932
time = { version = "0.3", optional = true }

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ DUCKDB_LIB_DIR = /Users/wangfenjin/duckdb
77
DUCKDB_INCLUDE_DIR = /Users/wangfenjin/duckdb
88

99
all:
10-
cargo test --features buildtime_bindgen -- --nocapture
11-
cargo clippy --all-targets --workspace --features buildtime_bindgen -- -D warnings -A clippy::redundant-closure
10+
cargo test --features buildtime_bindgen --features modern-full -- --nocapture
11+
cargo clippy --all-targets --workspace --features buildtime_bindgen --features modern-full -- -D warnings -A clippy::redundant-closure

add_rustfmt_hook.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ command -v rustfmt >/dev/null 2>&1 || { echo >&2 "Rustfmt is required but it's n
1010
cat > .git/hooks/pre-commit <<'EOF'
1111
#!/bin/bash -e
1212
declare -a rust_files=()
13-
files=$(git diff-index --name-only HEAD)
13+
files=$(git diff-index --name-only --cached HEAD)
1414
echo 'Formatting source files'
1515
for file in $files; do
1616
if [ ! -f "${file}" ]; then
1717
continue
1818
fi
19+
if [ "${file}" -eq 'libduckdb-sys/duckdb/bindgen_bundled_version.rs' ]; then
20+
continue
21+
fi
1922
if [[ "${file}" == *.rs ]]; then
2023
rust_files+=("${file}")
2124
fi

libduckdb-sys/bindgen.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env LIBDUCKDB_SYS_BUNDLING=1 cargo test --features "bundled buildtime_bindgen"
2424
find "$SCRIPT_DIR/../target" -type f -name bindgen.rs -exec cp {} "$DUCKDB_LIB_DIR/bindgen_bundled_version.rs" \;
2525

2626
# Sanity checks
27-
cd "$SCRIPT_DIR/.." || { echo "fatal error" >&2; exit 1; }
28-
cargo update
29-
cargo test --features "bundled buildtime_bindgen"
30-
printf ' \e[35;1mFinished\e[0m bundled DUCKDB tests\n'
27+
# cd "$SCRIPT_DIR/.." || { echo "fatal error" >&2; exit 1; }
28+
# cargo update
29+
# cargo test --features "bundled buildtime_bindgen"
30+
# printf ' \e[35;1mFinished\e[0m bundled DUCKDB tests\n'

0 commit comments

Comments
 (0)