mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-23 01:42:24 +00:00
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
28 lines
877 B
C#
Executable file
28 lines
877 B
C#
Executable file
using Dapper;
|
|
using FSO.Server.Database.DA.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace FSO.Server.Database.DA.LotVisitTotals
|
|
{
|
|
public class SqlLotVisitTotals : AbstractSqlDA, ILotVisitTotals
|
|
{
|
|
public SqlLotVisitTotals(ISqlContext context) : base(context)
|
|
{
|
|
}
|
|
|
|
public void Insert(IEnumerable<DbLotVisitTotal> input)
|
|
{
|
|
try {
|
|
Context.Connection.ExecuteBufferedInsert("INSERT INTO fso_lot_visit_totals (lot_id, date, minutes) VALUES (@lot_id, @date, @minutes) ON DUPLICATE KEY UPDATE minutes=VALUES(minutes)", input, 100);
|
|
}catch(Exception ex)
|
|
{
|
|
}
|
|
}
|
|
|
|
public void Purge(DateTime date)
|
|
{
|
|
Context.Connection.Execute("DELETE FROM fso_lot_visit_totals WHERE date < @date", new { date = date });
|
|
}
|
|
}
|
|
}
|