working
This commit is contained in:
@@ -2,10 +2,9 @@
|
||||
use steel::steel_vm::engine::Engine;
|
||||
use steel::steel_vm::register_fn::RegisterFn;
|
||||
use steel::rvals::SteelVal;
|
||||
use super::functions::{SteelContext, FunctionError};
|
||||
use super::functions::SteelContext;
|
||||
use sqlx::PgPool;
|
||||
use std::sync::Arc;
|
||||
use std::collections::HashMap;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -28,7 +27,7 @@ pub enum ExecutionError {
|
||||
pub fn execute_script(
|
||||
script: String,
|
||||
target_type: &str,
|
||||
db_pool: Arc<PgPool>,
|
||||
_db_pool: Arc<PgPool>, // Passed to the SteelContext
|
||||
context: SteelContext, // Contains row_data, profile_id, etc.
|
||||
) -> Result<Value, ExecutionError> {
|
||||
let mut vm = Engine::new();
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
// src/steel/server/functions.rs
|
||||
use steel::rvals::SteelVal;
|
||||
use sqlx::{PgPool, FromRow};
|
||||
use sqlx::PgPool;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use thiserror::Error;
|
||||
use serde_json::Value;
|
||||
use sqlx::postgres::PgRow;
|
||||
use sqlx::Row;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
||||
Reference in New Issue
Block a user