Skip to content

Commit 1d510fb

Browse files
committed
rename feature to with-jiff
1 parent 80d4da6 commit 1d510fb

File tree

5 files changed

+69
-69
lines changed

5 files changed

+69
-69
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ all-types = [
9393
"with-bigdecimal",
9494
"with-uuid",
9595
"with-time",
96-
"jiff",
96+
"with-juff",
9797
"with-ipnetwork",
9898
"with-mac_address",
9999
]

src/backend/query_builder.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,15 +1081,15 @@ pub trait QueryBuilder:
10811081
Value::TimeDateTime(None) => write!(s, "NULL").unwrap(),
10821082
#[cfg(feature = "with-time")]
10831083
Value::TimeDateTimeWithTimeZone(None) => write!(s, "NULL").unwrap(),
1084-
#[cfg(feature = "jiff")]
1084+
#[cfg(feature = "with-juff")]
10851085
Value::JiffDate(None) => write!(s, "NULL").unwrap(),
1086-
#[cfg(feature = "jiff")]
1086+
#[cfg(feature = "with-juff")]
10871087
Value::JiffTime(None) => write!(s, "NULL").unwrap(),
1088-
#[cfg(feature = "jiff")]
1088+
#[cfg(feature = "with-juff")]
10891089
Value::JiffDateTime(None) => write!(s, "NULL").unwrap(),
1090-
#[cfg(feature = "jiff")]
1090+
#[cfg(feature = "with-juff")]
10911091
Value::JiffTimestamp(None) => write!(s, "NULL").unwrap(),
1092-
#[cfg(feature = "jiff")]
1092+
#[cfg(feature = "with-juff")]
10931093
Value::JiffZoned(None) => write!(s, "NULL").unwrap(),
10941094
#[cfg(feature = "with-rust_decimal")]
10951095
Value::Decimal(None) => write!(s, "NULL").unwrap(),
@@ -1164,22 +1164,22 @@ pub trait QueryBuilder:
11641164
.unwrap(),
11651165
// Jiff date and time dosen't need format string
11661166
// The default behavior is what we want
1167-
#[cfg(feature = "jiff")]
1167+
#[cfg(feature = "with-juff")]
11681168
Value::JiffDate(Some(v)) => write!(s, "'{v}'").unwrap(),
1169-
#[cfg(feature = "jiff")]
1169+
#[cfg(feature = "with-juff")]
11701170
Value::JiffTime(Some(v)) => write!(s, "'{v}'").unwrap(),
11711171
// Both JiffDateTime and JiffTimestamp map to timestamp
1172-
#[cfg(feature = "jiff")]
1172+
#[cfg(feature = "with-juff")]
11731173
Value::JiffDateTime(Some(v)) => {
11741174
use crate::with_jiff::JIFF_DATE_TIME_FMT_STR;
11751175
write!(s, "'{}'", v.strftime(JIFF_DATE_TIME_FMT_STR)).unwrap()
11761176
}
1177-
#[cfg(feature = "jiff")]
1177+
#[cfg(feature = "with-juff")]
11781178
Value::JiffTimestamp(Some(v)) => {
11791179
use crate::with_jiff::JIFF_TIMESTAMP_FMT_STR;
11801180
write!(s, "'{}'", v.strftime(JIFF_TIMESTAMP_FMT_STR)).unwrap()
11811181
}
1182-
#[cfg(feature = "jiff")]
1182+
#[cfg(feature = "with-juff")]
11831183
Value::JiffZoned(Some(v)) => {
11841184
// Zoned map to timestamp with timezone
11851185

src/value.rs

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use chrono::{DateTime, FixedOffset, Local, NaiveDate, NaiveDateTime, NaiveTime,
1313
#[cfg(feature = "with-time")]
1414
use time::{OffsetDateTime, PrimitiveDateTime};
1515

16-
#[cfg(feature = "jiff")]
16+
#[cfg(feature = "with-juff")]
1717
use jiff::{Timestamp, Zoned};
1818

1919
#[cfg(feature = "with-rust_decimal")]
@@ -65,8 +65,8 @@ pub mod time_format;
6565
#[cfg_attr(docsrs, doc(cfg(feature = "with-time")))]
6666
mod with_time;
6767

68-
#[cfg(feature = "jiff")]
69-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
68+
#[cfg(feature = "with-juff")]
69+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
7070
pub(crate) mod with_jiff;
7171

7272
#[cfg(feature = "with-rust_decimal")]
@@ -159,24 +159,24 @@ pub enum ArrayType {
159159
#[cfg_attr(docsrs, doc(cfg(feature = "with-time")))]
160160
TimeDateTimeWithTimeZone,
161161

162-
#[cfg(feature = "jiff")]
163-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
162+
#[cfg(feature = "with-juff")]
163+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
164164
JiffDate,
165165

166-
#[cfg(feature = "jiff")]
167-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
166+
#[cfg(feature = "with-juff")]
167+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
168168
JiffTime,
169169

170-
#[cfg(feature = "jiff")]
171-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
170+
#[cfg(feature = "with-juff")]
171+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
172172
JiffDateTime,
173173

174-
#[cfg(feature = "jiff")]
175-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
174+
#[cfg(feature = "with-juff")]
175+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
176176
JiffTimestamp,
177177

178-
#[cfg(feature = "jiff")]
179-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
178+
#[cfg(feature = "with-juff")]
179+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
180180
JiffZoned,
181181

182182
#[cfg(feature = "with-uuid")]
@@ -270,24 +270,24 @@ pub enum Value {
270270
#[cfg_attr(docsrs, doc(cfg(feature = "with-time")))]
271271
TimeDateTimeWithTimeZone(Option<OffsetDateTime>),
272272

273-
#[cfg(feature = "jiff")]
274-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
273+
#[cfg(feature = "with-juff")]
274+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
275275
JiffDate(Option<jiff::civil::Date>),
276276

277-
#[cfg(feature = "jiff")]
278-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
277+
#[cfg(feature = "with-juff")]
278+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
279279
JiffTime(Option<jiff::civil::Time>),
280280

281-
#[cfg(feature = "jiff")]
282-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
281+
#[cfg(feature = "with-juff")]
282+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
283283
JiffDateTime(Option<jiff::civil::DateTime>),
284284

285-
#[cfg(feature = "jiff")]
286-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
285+
#[cfg(feature = "with-juff")]
286+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
287287
JiffTimestamp(Option<Timestamp>),
288288

289-
#[cfg(feature = "jiff")]
290-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
289+
#[cfg(feature = "with-juff")]
290+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
291291
JiffZoned(Option<Zoned>),
292292

293293
#[cfg(feature = "with-uuid")]
@@ -421,24 +421,24 @@ impl Value {
421421
#[cfg_attr(docsrs, doc(cfg(feature = "with-time")))]
422422
Self::TimeDateTimeWithTimeZone(_) => Self::TimeDateTimeWithTimeZone(None),
423423

424-
#[cfg(feature = "jiff")]
425-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
424+
#[cfg(feature = "with-juff")]
425+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
426426
Self::JiffDate(_) => Self::JiffDate(None),
427427

428-
#[cfg(feature = "jiff")]
429-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
428+
#[cfg(feature = "with-juff")]
429+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
430430
Self::JiffTime(_) => Self::JiffTime(None),
431431

432-
#[cfg(feature = "jiff")]
433-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
432+
#[cfg(feature = "with-juff")]
433+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
434434
Self::JiffDateTime(_) => Self::JiffDateTime(None),
435435

436-
#[cfg(feature = "jiff")]
437-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
436+
#[cfg(feature = "with-juff")]
437+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
438438
Self::JiffTimestamp(_) => Self::JiffTimestamp(None),
439439

440-
#[cfg(feature = "jiff")]
441-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
440+
#[cfg(feature = "with-juff")]
441+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
442442
Self::JiffZoned(_) => Self::JiffZoned(None),
443443

444444
#[cfg(feature = "with-uuid")]
@@ -545,26 +545,26 @@ impl Value {
545545
Self::TimeDateTimeWithTimeZone(Some(OffsetDateTime::UNIX_EPOCH))
546546
}
547547

548-
#[cfg(feature = "jiff")]
549-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
548+
#[cfg(feature = "with-juff")]
549+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
550550
Self::JiffDate(_) => Self::JiffDate(Some(jiff::civil::date(1970, 1, 1))),
551551

552-
#[cfg(feature = "jiff")]
553-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
552+
#[cfg(feature = "with-juff")]
553+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
554554
Self::JiffTime(_) => Self::JiffTime(Some(jiff::civil::time(0, 0, 0, 0))),
555555

556-
#[cfg(feature = "jiff")]
557-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
556+
#[cfg(feature = "with-juff")]
557+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
558558
Self::JiffDateTime(_) => {
559559
Self::JiffDateTime(Some(jiff::civil::date(1970, 1, 1).at(0, 0, 0, 0)))
560560
}
561561

562-
#[cfg(feature = "jiff")]
563-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
562+
#[cfg(feature = "with-juff")]
563+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
564564
Self::JiffTimestamp(_) => Self::JiffTimestamp(Some(Timestamp::UNIX_EPOCH)),
565565

566-
#[cfg(feature = "jiff")]
567-
#[cfg_attr(docsrs, doc(cfg(feature = "jiff")))]
566+
#[cfg(feature = "with-juff")]
567+
#[cfg_attr(docsrs, doc(cfg(feature = "with-juff")))]
568568
Self::JiffZoned(_) => Self::JiffZoned(Some(
569569
Timestamp::UNIX_EPOCH.to_zoned(jiff::tz::TimeZone::UTC),
570570
)),

src/value/hashable_value.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ impl PartialEq for Value {
4848
#[cfg(feature = "with-time")]
4949
(Self::TimeDateTimeWithTimeZone(l), Self::TimeDateTimeWithTimeZone(r)) => l == r,
5050

51-
#[cfg(feature = "jiff")]
51+
#[cfg(feature = "with-juff")]
5252
(Self::JiffDate(l), Self::JiffDate(r)) => l == r,
53-
#[cfg(feature = "jiff")]
53+
#[cfg(feature = "with-juff")]
5454
(Self::JiffTime(l), Self::JiffTime(r)) => l == r,
55-
#[cfg(feature = "jiff")]
55+
#[cfg(feature = "with-juff")]
5656
(Self::JiffDateTime(l), Self::JiffDateTime(r)) => l == r,
57-
#[cfg(feature = "jiff")]
57+
#[cfg(feature = "with-juff")]
5858
(Self::JiffTimestamp(l), Self::JiffTimestamp(r)) => l == r,
59-
#[cfg(feature = "jiff")]
59+
#[cfg(feature = "with-juff")]
6060
(Self::JiffZoned(l), Self::JiffZoned(r)) => l == r,
6161

6262
#[cfg(feature = "with-uuid")]
@@ -133,15 +133,15 @@ impl Hash for Value {
133133
#[cfg(feature = "with-time")]
134134
Value::TimeDateTimeWithTimeZone(offset_date_time) => offset_date_time.hash(state),
135135

136-
#[cfg(feature = "jiff")]
136+
#[cfg(feature = "with-juff")]
137137
Value::JiffDate(date) => date.hash(state),
138-
#[cfg(feature = "jiff")]
138+
#[cfg(feature = "with-juff")]
139139
Value::JiffTime(time) => time.hash(state),
140-
#[cfg(feature = "jiff")]
140+
#[cfg(feature = "with-juff")]
141141
Value::JiffDateTime(datetime) => datetime.hash(state),
142-
#[cfg(feature = "jiff")]
142+
#[cfg(feature = "with-juff")]
143143
Value::JiffTimestamp(timestamp) => timestamp.hash(state),
144-
#[cfg(feature = "jiff")]
144+
#[cfg(feature = "with-juff")]
145145
Value::JiffZoned(zoned) => zoned.hash(state),
146146

147147
#[cfg(feature = "with-uuid")]

src/value/with_json.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ pub fn sea_value_to_json_value(value: &Value) -> Json {
8383
Value::TimeDateTime(_) => CommonSqlQueryBuilder.value_to_string(value).into(),
8484
#[cfg(feature = "with-time")]
8585
Value::TimeDateTimeWithTimeZone(_) => CommonSqlQueryBuilder.value_to_string(value).into(),
86-
#[cfg(feature = "jiff")]
86+
#[cfg(feature = "with-juff")]
8787
Value::JiffDate(_) => CommonSqlQueryBuilder.value_to_string(value).into(),
88-
#[cfg(feature = "jiff")]
88+
#[cfg(feature = "with-juff")]
8989
Value::JiffTime(_) => CommonSqlQueryBuilder.value_to_string(value).into(),
90-
#[cfg(feature = "jiff")]
90+
#[cfg(feature = "with-juff")]
9191
Value::JiffDateTime(_) => CommonSqlQueryBuilder.value_to_string(value).into(),
92-
#[cfg(feature = "jiff")]
92+
#[cfg(feature = "with-juff")]
9393
Value::JiffTimestamp(_) => CommonSqlQueryBuilder.value_to_string(value).into(),
94-
#[cfg(feature = "jiff")]
94+
#[cfg(feature = "with-juff")]
9595
Value::JiffZoned(_) => CommonSqlQueryBuilder.value_to_string(value).into(),
9696
#[cfg(feature = "with-rust_decimal")]
9797
Value::Decimal(Some(v)) => {

0 commit comments

Comments
 (0)