forked from softlion/SQLite.Net-PCL2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIColumnInformationProvider.cs
More file actions
31 lines (28 loc) · 1.13 KB
/
IColumnInformationProvider.cs
File metadata and controls
31 lines (28 loc) · 1.13 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
using System;
using System.Reflection;
using System.Collections.Generic;
namespace SQLite.Net2
{
public interface IColumnInformationProvider
{
bool IsPK(MemberInfo m);
string Collation(MemberInfo m);
bool IsAutoInc(Type containedType, MemberInfo m, int tupleElementIndex);
int? MaxStringLength(MemberInfo p);
IEnumerable<IndexedAttribute> GetIndices(MemberInfo p);
object GetDefaultValue(MemberInfo p);
bool IsMarkedNotNull(MemberInfo p);
bool IsIgnored(MemberInfo p);
string GetColumnName(Type containedType, MemberInfo p, int tupleElementIndex);
Type GetMemberType(MemberInfo m);
object GetValue(MemberInfo m, object obj);
/// <summary>
/// Attempts to read an object from <see cref="stmt"/>. Returns non-null if the object is supported.
/// </summary>
/// <param name="mapping">Table mapping for the type to return</param>
/// <param name="sqLiteApi">SQLite API</param>
/// <param name="stmt">Statement row to read from.</param>
/// <returns>An object or null if the table/type is not supported.</returns>
object? TryReadObject(TableMapping mapping, ISQLiteApi sqLiteApi, IDbStatement stmt) => null;
}
}