pedrocarlo
e1d36a2221
clippy fix
2025-11-11 16:11:46 -03:00
pedrocarlo
98d268cdc6
change datetime functions to accept AsValueRef and not registers
2025-11-11 16:11:46 -03:00
pedrocarlo
1db13889e3
Change Value::Text to use a Cow<'static, str> instead of Vec<u8>
2025-11-11 16:11:46 -03:00
Nikita Sivukhin
6e0e4e20ab
add comment
2025-11-09 16:04:16 +04:00
Nikita Sivukhin
ec91829835
rewrite parse_modifier function because its current version lead to enormous amount of generated LLVM code which significantly increase compilation time
...
- cargo llvm-lines
Lines Copies Function name
----- ------ -------------
1322611 29544 (TOTAL)
278720 (21.1%, 21.1%) 1 (0.0%, 0.0%) turso_core::functions::datetime::parse_modifier
- before:
$> cargo check
warning: `turso_core` (lib) generated 2 warnings
Finished `dev` profile [unoptimized] target(s) in 5.61s
- after:
$> cargo check
warning: `turso_core` (lib) generated 2 warnings
Finished `dev` profile [unoptimized] target(s) in 2.24s
2025-11-09 15:15:45 +04:00
Nikita Sivukhin
39daf6df37
ask agent to rewrite compile-heavy function
2025-11-09 15:15:45 +04:00
Pekka Enberg
827b646c24
Switch to SQLite's Julian date logic
...
The `julian_day_converter` crate is GPL, which is problematic for apps
embedding Turso. Switch to SQLite's Julian date logic by porting the C
code to Rust.
2025-10-24 08:31:28 +03:00
Preston Thorpe
b310411997
Merge 'printf should truncates floats' from Pavan Nambi
...
closes https://github.com/tursodatabase/turso/issues/3308
Reviewed-by: Preston Thorpe <preston@turso.tech >
Closes #3415
2025-10-01 19:31:39 -04:00
Pavan-Nambi
15b5cefa6f
format shall not be used
2025-09-30 22:31:59 +05:30
luizgfc
3093371f76
core/printf: Fix printf compatibility with %f, %x and %o substitutions
2025-09-30 01:02:09 -03:00
luizgfc
5da6ed7499
core/printf: Fix null %s formatting behavior for sqlite compatibility
2025-09-29 21:26:47 -03:00
Pavan-Nambi
a8e337fd42
fmt,clippy
...
clippy
2025-09-28 21:24:08 +05:30
Pavan-Nambi
2335578c94
printf truncates floats
2025-09-28 21:16:33 +05:30
Pekka Enberg
c620a15a55
Merge 'core: Support ceiling modifier in datetime' from Ceferino Patino
...
Resolves #2677
- Implements the modifier for Floor on the datetime object.
- Implements the modifier for Ceiling on the datetime object.
- Includes additional testing changes in testing/scalar-functions-
datetime.test to test the sql functionality.
Consolidation PR of #2678 and #2679 since the functions ended up being
much more complicated than I initially thought and had to be done in a
single PR.
Closes #2757
2025-09-10 14:46:07 +03:00
TcMits
bfff05faba
merge main
2025-09-02 18:25:20 +07:00
TcMits
37f33dc45f
add eq/contains/starts_with/ends_with_ignore_ascii_case
2025-08-31 16:18:42 +07:00
luizgfc
528cab55c1
core/printf: %o substitution type implementation
2025-08-30 21:55:22 -03:00
luizgfc
38d528537a
core/printf: %x and %X substitution types implementation
2025-08-30 21:53:48 -03:00
luizgfc
3f7a7d0e39
core/printf: %c substitution type implementation
2025-08-30 21:49:59 -03:00
luizgfc
078b0aca79
core/printf: %e and %E substitution types implementation
2025-08-30 21:41:59 -03:00
luizgfc
82a5a16478
core/printf: %u substitution type implementation
2025-08-30 21:41:59 -03:00
C4 Patino
51621f462a
core(datetime): added implementation of ceiling modifier to datetime
2025-08-23 22:59:08 -05:00
Preston Thorpe
7f8e181cda
Merge 'Add documentation and rename functions' from Mikaël Francoeur
...
This PR adds documentation and renames some functions. Among other
things, I renamed everything that was still called `owned_value` to
either `db_value` or `value` (after
https://github.com/tursodatabase/turso/pull/1488 ).
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Reviewed-by: Preston Thorpe <preston@turso.tech >
Closes #2619
2025-08-16 17:45:33 -04:00
Mikaël Francoeur
2ee0132afe
rename functions
2025-08-15 17:08:53 -04:00
luizgfc
e370b714c9
core/printf: support for the %i operand
2025-08-15 09:48:55 -03:00
Nikita Sivukhin
41482915f6
make unixepoch to return i64
2025-07-16 14:02:56 +04:00
Nils Koch
828d4f5016
fix clippy errors for rust 1.88.0 (auto fix)
2025-07-12 18:58:41 +03:00
Nils Koch
2827b86917
chore: fix clippy warnings
2025-06-23 19:52:13 +01:00
Pekka Enberg
e3f71259d8
Rename OwnedValue -> Value
...
We have not had enough merge conflicts for a while so let's do a
tree-wide rename.
2025-05-15 09:59:46 +03:00
meteorgan
f3f7a722a7
avoid converting double to string in datetime
2025-04-13 16:41:30 +08:00
meteorgan
fd8f629ee4
comment format_julian_day()
2025-04-12 22:39:35 +08:00
meteorgan
8200b328d8
support modifiers for julianday()
2025-04-12 19:29:20 +08:00
Sachin Singh
23ab387143
handle formatting issues
2025-04-11 09:59:27 +05:30
Sachin Singh
b7acfa490c
feat: add timediff data and time function
2025-04-11 04:30:57 +05:30
Ihor Andrianov
922945e819
all output should go through display
2025-03-29 12:46:06 +02:00
Pere Diaz Bou
9291f60722
Introduce Register struct
...
OwnedValue has become a powerhouse of madness, mainly because I decided
to do it like that when I first introduced AggContext. I decided it was
enough and I introduced a `Register` struct that contains `OwnedValue`,
`Record` and `Aggregation`, this way we don't use `OwnedValue` for
everything make everyone's life harder.
This is the next step towards making ImmutableRecords the default
because I want to remove unnecessary allocations. Right now we clone
OwnedValues when we generate a record more than needed.
2025-03-27 17:53:02 +01:00
Doug Anderson444
0423945803
restrict chrono to no-dfault-features, update julian_day_converter
...
chrono has default features that are incompatible with some targets, such as non-js WebAssembly.
Removing the unused defaults allows limbo to compile to these targets
2025-02-10 21:58:34 -04:00
pedrocarlo
fe453ecfc5
remove RC<String> requirement for build_text and new text
2025-02-09 13:44:39 -03:00
Pekka Enberg
f4a574e6bc
core: Move strftime to functions module
2025-02-06 13:53:36 +02:00
Pekka Enberg
ee8eabf167
core: Move datetime to functions module
2025-02-06 13:52:25 +02:00
Pekka Enberg
7513f859df
core: Move printf to functions module
2025-02-06 13:50:05 +02:00