This commit is contained in:
filipriec
2025-03-16 15:19:21 +01:00
parent 4e3799e8d2
commit 587f122275
2 changed files with 3 additions and 6 deletions

View File

@@ -2,10 +2,9 @@
use steel::steel_vm::engine::Engine; use steel::steel_vm::engine::Engine;
use steel::steel_vm::register_fn::RegisterFn; use steel::steel_vm::register_fn::RegisterFn;
use steel::rvals::SteelVal; use steel::rvals::SteelVal;
use super::functions::{SteelContext, FunctionError}; use super::functions::SteelContext;
use sqlx::PgPool; use sqlx::PgPool;
use std::sync::Arc; use std::sync::Arc;
use std::collections::HashMap;
use thiserror::Error; use thiserror::Error;
#[derive(Debug)] #[derive(Debug)]
@@ -28,7 +27,7 @@ pub enum ExecutionError {
pub fn execute_script( pub fn execute_script(
script: String, script: String,
target_type: &str, target_type: &str,
db_pool: Arc<PgPool>, _db_pool: Arc<PgPool>, // Passed to the SteelContext
context: SteelContext, // Contains row_data, profile_id, etc. context: SteelContext, // Contains row_data, profile_id, etc.
) -> Result<Value, ExecutionError> { ) -> Result<Value, ExecutionError> {
let mut vm = Engine::new(); let mut vm = Engine::new();

View File

@@ -1,11 +1,9 @@
// src/steel/server/functions.rs // src/steel/server/functions.rs
use steel::rvals::SteelVal; use steel::rvals::SteelVal;
use sqlx::{PgPool, FromRow}; use sqlx::PgPool;
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::Arc; use std::sync::Arc;
use thiserror::Error; use thiserror::Error;
use serde_json::Value;
use sqlx::postgres::PgRow;
use sqlx::Row; use sqlx::Row;
#[derive(Debug, Error)] #[derive(Debug, Error)]