mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Remove manual extension registration
This commit is contained in:
parent
3d188eba0f
commit
c1152670a3
2 changed files with 9 additions and 1 deletions
|
@ -94,7 +94,7 @@ impl Database {
|
|||
#[cfg(feature = "percentile")]
|
||||
pub fn register_percentile(&self) -> Result<(), String> {
|
||||
let ext_api = self.build_limbo_ext();
|
||||
let res = unsafe { ::limbo_percentile::register_extension(&ext_api) };
|
||||
let res = unsafe { ::limbo_percentile::register_extension_static(&ext_api) };
|
||||
if !res.is_ok() {
|
||||
return Err("Failed to register percentile extension".to_string());
|
||||
}
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
use limbo_ext::{register_extension, AggFunc, AggregateDerive, ResultCode, Value};
|
||||
|
||||
#[cfg(feature = "static")]
|
||||
register_extension! {
|
||||
static_build: true,
|
||||
aggregates: { Median, Percentile, PercentileCont, PercentileDisc }
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "static"))]
|
||||
register_extension! {
|
||||
static_build: true,
|
||||
aggregates: { Median, Percentile, PercentileCont, PercentileDisc }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue