Search Results for

    Show / Hide Table of Contents

    Class Sql

    Class for compiling and executing sql statements using Simplic Async SQL. This class automatically caches compiled scripts.

    Inheritance
    System.Object
    Sql
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: SqlDotNet
    Assembly: SqlDotNet.dll
    Syntax
    public class Sql

    Constructors

    | Improve this Doc View Source

    Sql(IQueryExecutor, IErrorListener)

    Create sql interface

    Declaration
    public Sql(IQueryExecutor executor, IErrorListener errorListener)
    Parameters
    Type Name Description
    IQueryExecutor executor

    If statements should be executed and not just compiled, object which definition inherit from IQieryExecuter must be passed. This implementation carries for all sql executions

    IErrorListener errorListener

    Methods

    | Improve this Doc View Source

    Compile(String)

    Compile sql and return compiled result

    Declaration
    public CompiledQuery Compile(string sql)
    Parameters
    Type Name Description
    System.String sql

    Sql-Code to compile

    Returns
    Type Description
    CompiledQuery

    Result of the compiling process ready for executing

    | Improve this Doc View Source

    CompileAndExecute(String, IList<QueryParameter>, Boolean)

    Compile and execute a query. Use caching

    Declaration
    public object CompileAndExecute(string sql, IList<QueryParameter> parameter, bool useCache = true)
    Parameters
    Type Name Description
    System.String sql

    Sql query as string

    System.Collections.Generic.IList<QueryParameter> parameter

    Parameter as list

    System.Boolean useCache

    if set to true, cached queries will be used

    Returns
    Type Description
    System.Object

    Return value, amount for none query objects, else query result

    | Improve this Doc View Source

    Execute(CompiledQuery, IList<QueryParameter>)

    Execute a compiled sql query

    Declaration
    public ResultSet Execute(CompiledQuery query, IList<QueryParameter> parameter)
    Parameters
    Type Name Description
    CompiledQuery query

    Compiled query instance

    System.Collections.Generic.IList<QueryParameter> parameter

    List of parameter

    Returns
    Type Description
    ResultSet

    Return value, amount for none query objects, else query result

    | Improve this Doc View Source

    GetTokenizer()

    Create a new tokenizer instance

    Declaration
    public Tokenizer GetTokenizer()
    Returns
    Type Description
    Tokenizer
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx