Skip to main content

DbScripts

Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public class DbScripts : ScriptMethods

Properties

DbFactory

View Source
Declaration
public IDbConnectionFactory DbFactory { get; set; }

Inherited Properties

Context

View Source
Declaration
public ScriptContext Context { get; set; }

InvokerCache

View Source
Declaration
public ConcurrentDictionary<string, MethodInvoker> InvokerCache { get; }

Pages

View Source
Declaration
public ISharpPages Pages { get; set; }

Methods

OpenDbConnection(ScriptScopeContext, Dictionary<String, Object>)

View Source
Declaration
public IDbConnection OpenDbConnection(ScriptScopeContext scope, Dictionary<string, object> options)
Returns

IDbConnection

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
Dictionary<System.String,System.Object>options

useDb(ScriptScopeContext, Dictionary<String, Object>)

View Source
Declaration
public IgnoreResult useDb(ScriptScopeContext scope, Dictionary<string, object> dbConnOptions)
Returns

ServiceStack.Script.IgnoreResult

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
Dictionary<System.String,System.Object>dbConnOptions

dbSelect(ScriptScopeContext, String)

View Source
Declaration
public object dbSelect(ScriptScopeContext scope, string sql)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql

dbSelect(ScriptScopeContext, String, Dictionary<String, Object>)

View Source
Declaration
public object dbSelect(ScriptScopeContext scope, string sql, Dictionary<string, object> args)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args

dbSelect(ScriptScopeContext, String, Dictionary<String, Object>, Object)

View Source
Declaration
public object dbSelect(ScriptScopeContext scope, string sql, Dictionary<string, object> args, object options)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args
System.Objectoptions

dbSingle(ScriptScopeContext, String)

View Source
Declaration
public object dbSingle(ScriptScopeContext scope, string sql)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql

dbSingle(ScriptScopeContext, String, Dictionary<String, Object>)

View Source
Declaration
public object dbSingle(ScriptScopeContext scope, string sql, Dictionary<string, object> args)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args

dbSingle(ScriptScopeContext, String, Dictionary<String, Object>, Object)

View Source
Declaration
public object dbSingle(ScriptScopeContext scope, string sql, Dictionary<string, object> args, object options)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args
System.Objectoptions

dbScalar(ScriptScopeContext, String)

View Source
Declaration
public object dbScalar(ScriptScopeContext scope, string sql)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql

dbScalar(ScriptScopeContext, String, Dictionary<String, Object>)

View Source
Declaration
public object dbScalar(ScriptScopeContext scope, string sql, Dictionary<string, object> args)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args

dbScalar(ScriptScopeContext, String, Dictionary<String, Object>, Object)

View Source
Declaration
public object dbScalar(ScriptScopeContext scope, string sql, Dictionary<string, object> args, object options)
Returns

System.Object

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args
System.Objectoptions

dbCount(ScriptScopeContext, String)

View Source
Declaration
public long dbCount(ScriptScopeContext scope, string sql)
Returns

System.Int64

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql

dbCount(ScriptScopeContext, String, Dictionary<String, Object>)

View Source
Declaration
public long dbCount(ScriptScopeContext scope, string sql, Dictionary<string, object> args)
Returns

System.Int64

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args

dbCount(ScriptScopeContext, String, Dictionary<String, Object>, Object)

View Source
Declaration
public long dbCount(ScriptScopeContext scope, string sql, Dictionary<string, object> args, object options)
Returns

System.Int64

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args
System.Objectoptions

dbExists(ScriptScopeContext, String)

View Source
Declaration
public bool dbExists(ScriptScopeContext scope, string sql)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql

dbExists(ScriptScopeContext, String, Dictionary<String, Object>)

View Source
Declaration
public bool dbExists(ScriptScopeContext scope, string sql, Dictionary<string, object> args)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args

dbExists(ScriptScopeContext, String, Dictionary<String, Object>, Object)

View Source
Declaration
public bool dbExists(ScriptScopeContext scope, string sql, Dictionary<string, object> args, object options)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args
System.Objectoptions

dbExec(ScriptScopeContext, String)

View Source
Declaration
public int dbExec(ScriptScopeContext scope, string sql)
Returns

System.Int32

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql

dbExec(ScriptScopeContext, String, Dictionary<String, Object>)

View Source
Declaration
public int dbExec(ScriptScopeContext scope, string sql, Dictionary<string, object> args)
Returns

System.Int32

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args

dbExec(ScriptScopeContext, String, Dictionary<String, Object>, Object)

View Source
Declaration
public int dbExec(ScriptScopeContext scope, string sql, Dictionary<string, object> args, object options)
Returns

System.Int32

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
Dictionary<System.String,System.Object>args
System.Objectoptions

dbNamedConnections()

View Source
Declaration
public List<string> dbNamedConnections()
Returns

List<System.String>

dbTableNames(ScriptScopeContext)

View Source
Declaration
public List<string> dbTableNames(ScriptScopeContext scope)
Returns

List<System.String>

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope

dbTableNames(ScriptScopeContext, Dictionary<String, Object>)

View Source
Declaration
public List<string> dbTableNames(ScriptScopeContext scope, Dictionary<string, object> args)
Returns

List<System.String>

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
Dictionary<System.String,System.Object>args

dbTableNames(ScriptScopeContext, Dictionary<String, Object>, Object)

View Source
Declaration
public List<string> dbTableNames(ScriptScopeContext scope, Dictionary<string, object> args, object options)
Returns

List<System.String>

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
Dictionary<System.String,System.Object>args
System.Objectoptions

dbTableNamesWithRowCounts(ScriptScopeContext)

View Source
Declaration
public List<KeyValuePair<string, long>> dbTableNamesWithRowCounts(ScriptScopeContext scope)
Returns

List<KeyValuePair<System.String,System.Int64>>

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope

dbTableNamesWithRowCounts(ScriptScopeContext, Dictionary<String, Object>)

View Source
Declaration
public List<KeyValuePair<string, long>> dbTableNamesWithRowCounts(ScriptScopeContext scope, Dictionary<string, object> args)
Returns

List<KeyValuePair<System.String,System.Int64>>

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
Dictionary<System.String,System.Object>args

dbTableNamesWithRowCounts(ScriptScopeContext, Dictionary<String, Object>, Object)

View Source
Declaration
public List<KeyValuePair<string, long>> dbTableNamesWithRowCounts(ScriptScopeContext scope, Dictionary<string, object> args, object options)
Returns

List<KeyValuePair<System.String,System.Int64>>

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
Dictionary<System.String,System.Object>args
System.Objectoptions

dbColumnNames(ScriptScopeContext, String)

View Source
Declaration
public string[] dbColumnNames(ScriptScopeContext scope, string tableName)
Returns

System.String[]

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringtableName

dbColumnNames(ScriptScopeContext, String, Object)

View Source
Declaration
public string[] dbColumnNames(ScriptScopeContext scope, string tableName, object options)
Returns

System.String[]

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringtableName
System.Objectoptions

dbColumns(ScriptScopeContext, String)

View Source
Declaration
public ColumnSchema[] dbColumns(ScriptScopeContext scope, string tableName)
Returns

ServiceStack.OrmLite.ColumnSchema[]

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringtableName

dbColumns(ScriptScopeContext, String, Object)

View Source
Declaration
public ColumnSchema[] dbColumns(ScriptScopeContext scope, string tableName, object options)
Returns

ServiceStack.OrmLite.ColumnSchema[]

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringtableName
System.Objectoptions

dbDesc(ScriptScopeContext, String)

View Source
Declaration
public ColumnSchema[] dbDesc(ScriptScopeContext scope, string sql)
Returns

ServiceStack.OrmLite.ColumnSchema[]

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql

dbDesc(ScriptScopeContext, String, Object)

View Source
Declaration
public ColumnSchema[] dbDesc(ScriptScopeContext scope, string sql, object options)
Returns

ServiceStack.OrmLite.ColumnSchema[]

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringsql
System.Objectoptions

sqlQuote(ScriptScopeContext, String)

View Source
Declaration
public string sqlQuote(ScriptScopeContext scope, string name)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringname

sqlConcat(ScriptScopeContext, IEnumerable<Object>)

View Source
Declaration
public string sqlConcat(ScriptScopeContext scope, IEnumerable<object> values)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
IEnumerable<System.Object>values

sqlCurrency(ScriptScopeContext, String)

View Source
Declaration
public string sqlCurrency(ScriptScopeContext scope, string fieldOrValue)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringfieldOrValue

sqlCurrency(ScriptScopeContext, String, String)

View Source
Declaration
public string sqlCurrency(ScriptScopeContext scope, string fieldOrValue, string symbol)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringfieldOrValue
System.Stringsymbol

sqlCast(ScriptScopeContext, Object, String)

View Source
Declaration
public string sqlCast(ScriptScopeContext scope, object fieldOrValue, string castAs)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.ObjectfieldOrValue
System.StringcastAs

sqlBool(ScriptScopeContext, Boolean)

View Source
Declaration
public string sqlBool(ScriptScopeContext scope, bool value)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Booleanvalue

sqlTrue(ScriptScopeContext)

View Source
Declaration
public string sqlTrue(ScriptScopeContext scope)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope

sqlFalse(ScriptScopeContext)

View Source
Declaration
public string sqlFalse(ScriptScopeContext scope)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope

sqlLimit(ScriptScopeContext, Nullable<Int32>, Nullable<Int32>)

View Source
Declaration
public string sqlLimit(ScriptScopeContext scope, int? offset, int? limit)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Nullable<System.Int32>offset
System.Nullable<System.Int32>limit

sqlLimit(ScriptScopeContext, Nullable<Int32>)

View Source
Declaration
public string sqlLimit(ScriptScopeContext scope, int? limit)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Nullable<System.Int32>limit

sqlSkip(ScriptScopeContext, Nullable<Int32>)

View Source
Declaration
public string sqlSkip(ScriptScopeContext scope, int? offset)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Nullable<System.Int32>offset

sqlTake(ScriptScopeContext, Nullable<Int32>)

View Source
Declaration
public string sqlTake(ScriptScopeContext scope, int? limit)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Nullable<System.Int32>limit

sqlOrderByFields(ScriptScopeContext, String)

View Source
Declaration
public string sqlOrderByFields(ScriptScopeContext scope, string orderBy)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringorderBy

ormliteVar(ScriptScopeContext, String)

View Source
Declaration
public string ormliteVar(ScriptScopeContext scope, string name)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Stringname

sqlVerifyFragment(String)

View Source
Declaration
public string sqlVerifyFragment(string sql)
Returns

System.String

Parameters
TypeName
System.Stringsql

isUnsafeSql(String)

View Source
Declaration
public bool isUnsafeSql(string sql)
Returns

System.Boolean

Parameters
TypeName
System.Stringsql

isUnsafeSqlFragment(String)

View Source
Declaration
public bool isUnsafeSqlFragment(string sql)
Returns

System.Boolean

Parameters
TypeName
System.Stringsql

Inherited Methods

GetInvoker(String, Int32, InvokerType)

View Source
Declaration
public MethodInvoker GetInvoker(string name, int argsCount, InvokerType type)
Returns

ServiceStack.MethodInvoker

Parameters
TypeName
System.Stringname
System.Int32argsCount
ServiceStack.Script.InvokerTypetype

QueryFilters(String)

View Source
Declaration
public List<MethodInfo> QueryFilters(string filterName)
Returns

System.Collections.Generic.List<System.Reflection.MethodInfo>

Parameters
TypeName
System.StringfilterName