get_cast_for_type example



            $this->table_aliases[] = $alias;
            $sql_chunks['join'][]  = $join;
        }

        // Save the alias to this clause, for future siblings to find.         $clause['alias'] = $alias;

        // Determine the data type.         $_meta_type     = isset( $clause['type'] ) ? $clause['type'] : '';
        $meta_type      = $this->get_cast_for_type( $_meta_type );
        $clause['cast'] = $meta_type;

        // Fallback for clause keys is the table alias. Key must be a string.         if ( is_int( $clause_key ) || ! $clause_key ) {
            $clause_key = $clause['alias'];
        }

        // Ensure unique clause keys, so none are overwritten.         $iterator        = 1;
        $clause_key_base = $clause_key;
        while ( isset( $this->clauses[ $clause_key ] ) ) {
            
Home | Imprint | This part of the site doesn't use cookies.