using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.DataStore
{
///
/// Represents a data store collection.
///
public interface IDataStoreCollection
{
///
/// Gets the collection name.
///
String Name { get; }
///
/// Upserts the specified key and value.
///
/// The key.
/// The value.
void Put(String key, Object value);
///
/// Upserts the specified key and value of type T.
///
///
/// The key.
/// The value.
void Put(String key, T value);
///
/// Upserts the specified key and value.
/// The value must be of the specified DataType.
///
/// The key.
/// The type.
/// The value.
void Put(String key, DataType type, Object value);
///
/// Gets the value by the specified key
///
/// The key.
///
Object Get(String key);
///
/// Gets the value by the specified key
///
/// The key.
/// Will execute put when the key was not found.
///
Object Get(String key, Object defaultValue);
///
/// Gets the value of type T by the specified key
///
///
/// The key.
///
T Get(String key);
///
/// Gets the value of type T by the specified key
///
///
/// The key.
/// Will execute put when the key was not found.
///
T Get(String key, T defaultValue);
///
/// Gets the full data store item by the specified key.
///
/// The key.
///
IDataStoreItem GetItem(String key);
///
/// Gets the full data store item by the specified key.
///
/// The key.
/// Will execute put when the key was not found.
///
IDataStoreItem GetItem(String key, Object defaultValue);
///
/// Gets all the data store items in the collection.
///
///
List GetAll();
///
/// Gets all the data store unsynchronized items in the collection.
///
///
List GetUnsynchronized();
///
/// Deleted an item by the specified key.
///
/// The key.
void Delete(String key);
///
/// Deletes all items in the collection.
///
void DeleteAll();
///
/// Returns the number of items in the collection.
///
///
int Count();
}
}