public function prepare( $val, $col=null, $type=null )
    {
        if( is_array( $val ) ) {
            $holder = [];
            foreach( $val as $key => $v ) {
                $holder[$key] = $this->prepare( $v, $col, $type );
            }
            return $holder;
        }
        if( $val instanceof \Closure ) return $val;

        $holder  = ( static::$useColumnInBindValues ) ? ':' : ''; 
        $holder .=  'db_prep_' . $this->prepared_counter++;
        $this->prepared_values[ $holder ] = $val;
        $this->setPreparedType( $holder, $col, $type );
        if( !static::$useColumnInBindValues ) $holder = ':'.$holder;
        return $holder;
    }
public function prepare( $val, $col=null, $type=null )
    {
        if( is_array( $val ) ) {
            $holder = [];
            foreach( $val as $key => $v ) {
                $holder[$key] = $this->prepare( $v, $col, $type );
            }
            return $holder;
        }
        if( $val instanceof \Closure ) return $val;

        $holder  = ( static::$useColumnInBindValues ) ? ':' : ''; 
        $holder .=  'db_prep_' . $this->prepared_counter++;
        $this->prepared_values[ $holder ] = $val;
        $this->setPreparedType( $holder, $col, $type );
        if( !static::$useColumnInBindValues ) $holder = ':'.$holder;
        return $holder;
    }
public function prepare ( $ val , $ col = null , $ type = null ) { if ( is_array ( $ val ) ) { $ holder = [ ] ; foreach ( $ val as $ key => $ v ) { $ holder [ $ key ] = $ this -> prepare ( $ v , $ col , $ type ) ; } return $ holder ; } if ( $ val instanceof \ Closure ) return $ val ; $ holder = ( static :: $ useColumnInBindValues ) ? ':' : '' ; $ holder .= 'db_prep_' . $ this -> prepared_counter ++ ; $ this -> prepared_values [ $ holder ] = $ val ; $ this -> setPreparedType ( $ holder , $ col , $ type ) ; if ( ! static :: $ useColumnInBindValues ) $ holder = ':' . $ holder ; return $ holder ; }
replaces value with place holder for prepared statement.
the value is kept in prepared_value array.

if $type is specified, or column data type is set in col_data_types,
types for the place holder is kept in prepared_types array.

@param string|array $val
@param null|int|string  $col     column name. used to find data type
@param null|int         $type    data type
@return string|array
replaces value with place holder for prepared statement . the value is kept in prepared_value array .