TorchAutoModerator/Utils.General/StupidDb.cs
/// <summary>
/// Get documents in specified table.
/// </summary>
/// <param name="tableName">Name of table.</param>
/// <typeparam name="T">Type of documents in the table.</typeparam>
/// <returns>Collection of documents in the table.</returns>
Get documents in specified table.
Get documents in specified table .
[MethodImpl(MethodImplOptions.Synchronized)]
        public IEnumerable<T> Query<T>(string tableName)
        {
            if (!_ramCopy.TryGetValue(tableName, out var tableToken))
            {
                return Enumerable.Empty<T>();
            }
            var documents = tableToken.ToObject<Dictionary<string, T>>();
            return documents.Values;
        }
[ MethodImpl ( MethodImplOptions . Synchronized ) ] public IEnumerable < T > Query < T > ( string tableName ) { if ( ! _ramCopy . TryGetValue ( tableName , out var tableToken ) ) { return Enumerable . Empty < T > ( ) ; } var documents = tableToken . ToObject < Dictionary < string , T > > ( ) ; return documents . Values ; }
Get documents in specified table.
Get documents in specified table .
Collection of documents in the table.
Collection of documents in the table .
tableName
string
Name of table.
Name of table .
typeparam
Type of documents in the table.
Type of documents in the table .