IDatabaseModule.cs 1019 B

1234567891011121314151617181920
  1. 
  2. namespace XGame.Framework.Database
  3. {
  4. public interface IDatabaseModule
  5. {
  6. TTable GetByKey<TTable, TRepository>(long key) where TTable : class, ITable where TRepository : TableRepository<TTable, TRepository>;
  7. /// <summary>
  8. /// 根据索引取值
  9. /// index == -1 表示取最后一个
  10. /// </summary>
  11. /// <typeparam name="TTable"></typeparam>
  12. /// <typeparam name="TRepository"></typeparam>
  13. /// <param name="index"></param>
  14. /// <returns></returns>
  15. TTable GetByIndex<TTable, TRepository>(int index) where TTable : class, ITable where TRepository : TableRepository<TTable, TRepository>;
  16. TTable[] GetAll<TTable, TRepository>() where TTable : class, ITable where TRepository : TableRepository<TTable, TRepository>;
  17. IDatabaseAsync<TTable> LoadAsync<TTable, TRepository>(string tableName) where TTable : class, ITable where TRepository : TableRepository<TTable, TRepository>;
  18. void Unload(string tableName);
  19. }
  20. }