-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathFakeDataClient.cs
More file actions
74 lines (65 loc) · 3.43 KB
/
FakeDataClient.cs
File metadata and controls
74 lines (65 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using SharpData.Filters;
using SharpData.Fluent;
using SharpData.Schema;
namespace SharpData {
public class FakeDataClient : IDataClient {
public void Dispose() {}
public IDatabase Database { get; private set; }
public Dialect Dialect { get; private set; }
public bool ThrowException { get; set; }
public FluentAdd Add { get; private set; }
public FluentRemove Remove { get; private set; }
public FluentRename Rename { get; private set; }
public IFluentInsert Insert { get; private set; }
public IFluentSelect Select { get; private set; }
public IFluentUpdate Update { get; private set; }
public IFluentDelete Delete { get; private set; }
public IFluentCount Count { get; private set; }
public IFluentModify Modify { get; private set; }
public void AddTable(string tableName, params FluentColumn[] columns) {}
public void AddColumn(string tableName, Column column) {}
public void AddForeignKey(string fkName, string table, string column, string referencingTable, string referencingColumn, OnDelete onDelete) {}
public void AddNamedPrimaryKey(string tableName, string pkName, params string[] columnNames) {}
public void AddPrimaryKey(string tableName, params string[] columnNames) {}
public void AddUniqueKey(string uniqueKeyName, string tableName, params string[] columnNames) {}
public void AddIndex(string indexName, string tableName, params string[] columnNames) {}
public void AddColumnComment(string tableName, string columnName, string comment) {}
public void AddTableComment(string tableName, string comment) {}
public void RemoveTable(string tableName) { }
public void RemoveColumn(string tableName, string columnName) { }
public void RemovePrimaryKey(string tableName, string primaryKeyName) { }
public void RemoveForeignKey(string foreigKeyName, string tableName) {}
public void RemoveUniqueKey(string uniqueKeyName, string tableName) {}
public void RemoveIndex(string indexName, string table) {}
public void RemoveTableComment(string tableName) {}
public void RemoveColumnComment(string tableName, string columnName) {}
public void RenameTable(string tableName, string newTableName) {}
public void RenameColumn(string tableName, string columnName, string newColumnName) {}
public void ModifyColumn(string firstTableName, string columnName, Column columnDefinition) {}
public void Commit() {}
public void RollBack() {}
public void Close() {}
public ResultSet SelectSql(string[] tables, string[] columns, Filter filter, OrderBy[] orderBys, int skip, int take) {
return new ResultSet();
}
public int InsertSql(string table, string[] columns, object[] values) {
return 0;
}
public object InsertReturningSql(string table, string columnToReturn, string[] columns, object[] values) {
return 0;
}
public int UpdateSql(string table, string[] columns, object[] values, Filter filter) {
return 0;
}
public int DeleteSql(string table, Filter filter) {
return 0;
}
public int CountSql(string table, Filter filter) {
return 0;
}
public bool TableExists(string table) {
return false;
}
}
}