Esempio n. 1
0
 public static string CreateTableScript <T>(T proto, string tableName, bool checkIfNotExists = false,
                                            ColumnDefinitionOptions options = null, FromTypeOption fromTypeOption = FromTypeOption.Default)
 {
     return(CreateTableScript <T>(tableName, checkIfNotExists, options, fromTypeOption));
 }
Esempio n. 2
0
 public static UniversalDataReader <T> ToDataReader <T>(this IAsyncEnumerable <T> values, FromTypeOption fromTypeOption, bool caseSensitive = defaultReaderCaseSensitive)
 {
     return(new UniversalDataReader <T>(values, FieldSettings.FromType <T>(fromTypeOption), caseSensitive));
 }
Esempio n. 3
0
 public static string GetCreateTableScript <T>(this IEnumerable <T> values, string tableName, bool checkIfNotExists = false,
                                               ColumnDefinitionOptions options = null, FromTypeOption fromTypeOption = FromTypeOption.Default)
 {
     return(GetColumnDefinitions(values, options, fromTypeOption).CreateTableScript(tableName, checkIfNotExists));
 }
Esempio n. 4
0
 public static string CreateTableScript <T>(string tableName, bool checkIfNotExists = false,
                                            ColumnDefinitionOptions options         = null, FromTypeOption fromTypeOption = FromTypeOption.Default)
 {
     return(FieldSettings.FromType <T>(fromTypeOption).GetColumnDefinitions(options).CreateTableScript(tableName, checkIfNotExists));
 }
Esempio n. 5
0
 public MappedCommand <T> CompileUpdate <T>(string tableName, FromTypeOption fromTypeOption, IList <string> keyFields, IList <string> notKeyIgnoreFields)
 {
     return(CompileUpdate(tableName, FieldSettings.FromType <T>(fromTypeOption), keyFields, notKeyIgnoreFields));
 }
Esempio n. 6
0
 public static IEnumerable <ColumnDefinition> GetColumnDefinitions <T>(this IEnumerable <T> values, ColumnDefinitionOptions options = null,
                                                                       FromTypeOption fromTypeOption = FromTypeOption.Default)
 {
     return(values.GetFieldSettings(fromTypeOption).GetColumnDefinitions(options));
 }
Esempio n. 7
0
 public MappedCommand <T> CompileMapped <T>(T proto, string commandText, FromTypeOption fromTypeOption = FromTypeOption.Default, bool caseSensitiveParamsMatching = false)
 {
     return(new MappedCommand <T>(contextProvider, commandText, contextProvider.ParamsFromCommandText(commandText), FieldSettings.FromType(proto, fromTypeOption),
                                  caseSensitiveParamsMatching));
 }
 public static IWrappedCommand CreateMapped <T>(this ICommandCreator creator, string commandText, T value, QueryOptions queryOptions = null, FromTypeOption fromTypeOption = FromTypeOption.Default)
 {
     return(creator.Set(x =>
     {
         var o = x.PrepareQueryOptions(queryOptions);
         return x.CommandCompilator.CompileMapped <T>(commandText, fromTypeOption, o.CaseSensitiveParamsMatching.Value).Create(x, value, o);
     }));
 }
Esempio n. 9
0
 public MappedCommand <T> CompileMerge <T>(T proto, string tableName, FromTypeOption fromTypeOption, params string[] keyFields)
 {
     return(CompileMerge(tableName, FieldSettings.FromType(proto, fromTypeOption), keyFields, new List <string>()));
 }
Esempio n. 10
0
 public MappedCommand <T> CompileMapped <T>(string commandText, IList <string> paramNames, FromTypeOption fromTypeOption = FromTypeOption.Default,
                                            bool caseSensitiveParamsMatching = false)
 {
     return(new MappedCommand <T>(contextProvider, commandText, paramNames, FieldSettings.FromType <T>(fromTypeOption), caseSensitiveParamsMatching));
 }
Esempio n. 11
0
 public MappedCommand <T> CompileMerge <T>(T proto, string tableName, FromTypeOption fromTypeOption, IList <string> keyFields, IList <string> notKeyIgnoreFields)
 {
     return(CompileMerge(tableName, FieldSettings.FromType(proto, fromTypeOption), keyFields, notKeyIgnoreFields));
 }
Esempio n. 12
0
 public MappedCommand <T> CompileDelete <T>(T proto, string tableName, FromTypeOption fromTypeOption, params string[] keyFields)
 {
     return(CompileDelete(tableName, FieldSettings.FromType(proto, fromTypeOption), keyFields));
 }
Esempio n. 13
0
 public MappedCommand <T> CompileUpdate <T>(string tableName, FromTypeOption fromTypeOption, params string[] keyFields)
 {
     return(CompileUpdate(tableName, FieldSettings.FromType <T>(fromTypeOption), keyFields, new List <string>()));
 }
Esempio n. 14
0
 public static FieldSettings <T>[] GetFieldSettings <T>(this IEnumerable <T> values, FromTypeOption fromTypeOption = FromTypeOption.Default)
 {
     return(FieldSettings.FromType <T>(fromTypeOption));
 }
Esempio n. 15
0
 public MappedCommand <T> CompileProcedure <T>(T proto, string name, IList <string> paramNames, FromTypeOption fromTypeOption = FromTypeOption.Default, bool caseSensitiveParamsMatching = false)
 {
     return(new MappedCommand <T>(contextProvider, name, paramNames, FieldSettings.FromType(proto, fromTypeOption), caseSensitiveParamsMatching, CommandType.StoredProcedure));
 }
Esempio n. 16
0
 public ExecutionOptions(int? commandTimeoutSeconds = null, FieldsSelector fieldsSelector = FieldsSelector.Destination, bool caseSensitive = false, FromTypeOption fromTypeOption = FromTypeOption.Default)
     : this(new QueryOptions(commandTimeoutSeconds), new ReadOptions(fieldsSelector, caseSensitive, fromTypeOption))
 {
 }
Esempio n. 17
0
        public MappedCommand <T> CompileProcedure <T>(T proto, string name, FromTypeOption fromTypeOption = FromTypeOption.Default, bool caseSensitiveParamsMatching = false)
        {
            var settings = FieldSettings.FromType(proto, fromTypeOption);

            return(new MappedCommand <T>(contextProvider, name, contextProvider.ParamsFromSettings(settings), settings, caseSensitiveParamsMatching, CommandType.StoredProcedure));
        }
Esempio n. 18
0
 public static IWrappedCommand CreateProcedure <T>(this ICommandCreator creator, string name, IList <string> paramNames, T value, QueryOptions queryOptions = null, FromTypeOption fromTypeOption = FromTypeOption.Both)
 {
     return(creator.Set(x =>
     {
         var o = x.PrepareQueryOptions(queryOptions);
         return x.CommandCompilator.CompileProcedure <T>(name, paramNames, fromTypeOption, o.CaseSensitiveParamsMatching.Value).Create(x, value, o);
     }));
 }
Esempio n. 19
0
 public MappedCommand <T> CompileInsert <T>(T proto, string tableName, FromTypeOption fromTypeOption, params string[] ignoreFields)
 {
     return(CompileInsert(tableName, FieldSettings.FromType(proto, fromTypeOption), ignoreFields));
 }