RedBase Documentation

Welcome to the RedBase documentation portal. Browse the API reference, explore code examples, and learn how to build with REDB.

API Reference

Browse the REDB API documentation. Select a namespace or type from the tree on the left, or click on items below.

Showing: redb.Examples.Examples Show all

redb.Examples.Examples

Classes

C E000_BulkInsert Example: Bulk insert of complex employee records.
C E001_SaveAsync Example: Create and save a new employee.
C E002_LoadAsync Example: Load employee by ID.
C E010_WhereSimple Example: Simple Where filter by salary.
C E011_WhereAnd Example: Where with AND - filter by age and salary.
C E012_WhereOr Filter employees using OR condition.
C E013_WhereNot Filter employees using NOT equal condition.
C E014_WhereRange Filter employees by salary range.
C E015_WhereTripleAnd Filter employees using triple AND condition.
C E016_WhereChain Filter employees using chained Where() calls.
C E020_DateTimeGreater Filter employees by hire date.
C E021_DateTimeRange Filter employees by date range.
C E030_StringContains Filter employees using String.Contains.
C E031_StringStartsWith Filter employees using String.StartsWith.
C E032_StringContainsIgnoreCase Filter using case-insensitive String.Contains.
C E040_NestedProperty Filter employees by nested property.
C E041_DeepNested Filter employees by deeply nested property.
C E050_ArrayContains Query employees by skill using Array.Contains.
C E051_ArrayMultiple Query employees with multiple skills using Array.Contains with OR.
C E052_ArrayNotContains Query employees excluding specific skill.
C E053_ArrayWithConditions Query employees combining array Contains with other conditions (Pro).
C E060_DictContainsKey Query employees using Dictionary.ContainsKey.
C E061_DictIndexer Query employees using Dictionary indexer.
C E062_DictNestedClass Query employees using Dict indexer with nested class (Pro).
C E063_DictTupleKey Query employees using Dict with tuple key (Pro).
C E070_CountAsync Count employees using CountAsync.
C E071_AnyAsync Check if any employees exist using AnyAsync().
C E072_AnyWithPredicate Check if any employees match a condition using AnyAsync(predicate).
C E073_AllAsync Check if ALL employees match a condition using AllAsync(predicate).
C E074_WhereIn Filter employees by a list of values using WhereIn.
C E075_Select Project specific fields using Select (server-side projection).
C E076_Distinct Get unique objects by Props hash using Distinct().
C E080_OrderBy Sort employees by salary using OrderBy.
C E081_OrderByThenBy Sort employees by multiple fields using ThenBy.
C E082_SkipTake Paginate employees using Skip and Take.
C E083_OrderByDescending Sort employees in descending order using OrderByDescending.
C E087_TreeCleanup Cleanup existing tree data before E088/E089 tests.
C E088_TreeCreateBulk BULK create tree hierarchy (Pro feature) - FAST version.
C E089_TreeCreate Sequential create tree hierarchy (Pro feature) - SLOW version.
C E090_TreeLoad Load full tree with LoadTreeAsync.
C E091_TreeCount Count tree nodes with TreeQuery.
C E092_TreeChildren Get direct children of a node.
C E093_TreePath Get path from node to root.
C E094_TreeDescendants Get all descendants of a node.
C E095_TreeMove Move node to new parent.
C E096_TreeQuery LINQ queries on tree structures.
C E097_TreeQueryRoots Find root nodes in tree.
C E098_TreeQueryLeaves Find leaf nodes in tree.
C E099_TreeQueryLevel Filter tree nodes by level.
C E100_TreeTraversalDFS Depth-First traversal of tree.
C E101_TreeTraversalBFS Breadth-First traversal of tree.
C E102_TreeIsDescendant Check if node is descendant of another.
C E103_TreeIsAncestor Check if node is ancestor of another.
C E104_TreeGetLevel Get tree level of a node.
C E105_TreeQueryWithRoot TreeQuery scoped to specific root.
C E106_TreeQueryChildrenOf Query direct children of a node.
C E107_TreeQueryMultiRoot TreeQuery with multiple root parents.
C E108_TreeToTreeList ToTreeListAsync with Parent chain.
C E109_TreeToRootList ToRootListAsync - get full tree structure.
C E110_TreeWhereHasAncestor WhereHasAncestor - polymorphic ancestor filter.
C E111_TreeWhereHasDescendant WhereHasDescendant - find parents by child criteria.
C E112_TreeStats Tree statistics via TreeCollection.
C E113_TreeToFlatList Load tree nodes as flat list without Parent/Children links.
C E114_ListCreate Creates a new RedbList (dictionary/lookup table).
C E115_ListAddItems Adds multiple items to a RedbList using AddItemsAsync.
C E116_ListGetByName Gets a RedbList by name and retrieves its items.
C E117_ListItemWithObject Creates a ListItem with linked RedbObject.
C E118_PropsListItemField Object with ListItem field in Props.
C E119_PropsListItemArray Object with List of ListItems field in Props.
C E120_ListItemWhereByValue Query filtering by ListItem.Value property.
C E121_ListItemWhereIn Query filtering by ListItem.Value using WhereIn.
C E122_ListItemDirectCompare Query filtering by direct ListItem comparison.
C E123_ListItemArrayAny Query filtering by ListItem array using Any().
C E124_SumAsync Calculates sum of a numeric field using SumAsync.
C E125_AverageAsync Calculates average of a numeric field using AverageAsync.
C E126_MinMaxAsync Calculates min and max of numeric fields using MinAsync/MaxAsync.
C E127_AggregateAsync Batch aggregation with multiple functions in single query.
C E128_GroupBySimple Groups objects by a field and calculates aggregates per group.
C E129_GroupByFiltered GroupBy with Where filter applied before grouping.
C E130_GroupByMultiKey GroupBy with composite key (multiple fields).
C E131_GroupByRedb GroupBy on base RedbObject fields without JOIN.
C E132_WindowRowNumber Window function ROW_NUMBER() with PARTITION BY.
C E133_WindowRunningSum Window function SUM() OVER for running totals.
C E134_WindowLagLead Window functions LAG/LEAD for previous/next values.
C E135_WindowRank Window functions RANK/DENSE_RANK for ranking with ties.
C E136_WindowNtile Window function NTILE for bucket distribution.
C E137_WindowFirstLast Window functions FIRST_VALUE/LAST_VALUE.
C E138_WindowFrame Window function with custom frame (sliding window).
C E139_DistinctRedb DISTINCT ON base fields (without Id) for finding duplicates.
C E140_DistinctByRedb DISTINCT ON specific base field.
C E141_WhereInRedb Filter by list of base field values.
C E142_GroupByArray Groups objects by elements of an array field using GroupByArray.
C E143_SumRedbAsync SumRedbAsync - sum of base IRedbObject field WITHOUT JOIN to _values.
C E144_MinMaxRedbAsync MinRedbAsync/MaxRedbAsync - min/max of base IRedbObject fields WITHOUT JOIN.
C E145_AverageRedbAsync AverageRedbAsync - average of base IRedbObject field WITHOUT JOIN.
C E146_AggregateRedbAsync AggregateRedbAsync - batch aggregation of base IRedbObject fields in ONE query.
C E147_WindowPartitionByRedb PartitionByRedb in Window Functions - partition by base IRedbObject field.
C E148_WindowOrderByRedb OrderByRedb in Window Functions - order by base IRedbObject field.
C E149_SelectProjection Select projection - load only specific fields instead of full object.
C E150_ArrayAggregation Array aggregation - aggregate all elements of array field or specific index.
C E151_ArithmeticMultiply Demonstrates arithmetic multiplication in Where clause.
C E152_ArithmeticAddFields Demonstrates arithmetic operations combining multiple fields in Where clause.
C E153_StringToLower Demonstrates case-insensitive string search using ToLower() in Where clause.
C E154_StringTrim Demonstrates Trim() function in Where clause to filter out empty or whitespace-only values.
C E155_StringChain Demonstrates chaining multiple string functions in Where clause.
C E156_MathAbs Demonstrates Math.Abs() in Where clause for range filtering around a target value.
C E157_DateTimeYear Demonstrates DateTime property extraction in WhereRedb clause.
C E158_Parentheses Demonstrates parentheses for operation priority in Where clause.
C E159_NestedMath Demonstrates nested Math functions with arithmetic in Where clause.
C E160_TreeQueryExpressions Demonstrates arithmetic expressions in TreeQuery Where clause.
C E161_SqlFunctionCoalesce Demonstrates Sql.Function for calling custom SQL functions.
C E162_SqlFunctionPower Demonstrates Sql.Function for mathematical SQL functions.
C E163_SqlFunctionNested Demonstrates nested Sql.Function calls for complex SQL expressions.
C E164_BaseFieldsSingle Demonstrates using RedbObject base fields without Props (EAV values).
C E165_BaseFieldsBatch Demonstrates batch save/load of non-generic RedbObject with base fields.
C E166_GenericNullProps Demonstrates using generic RedbObject<TProps> with Props=null.
C E167_MixedBatch Demonstrates mixed batch save with both non-generic RedbObject and generic RedbObject<T> with Props=...
C E168_ArrayContains Demonstrates filtering by array element using Contains().
C E169_ArrayContainsOr Demonstrates filtering by multiple array elements using Contains with OR.
C E170_ArrayContainsAnd Demonstrates filtering by multiple array elements using Contains with AND.
C E171_ScalarPlusArray Demonstrates combining scalar field filter with array Contains filter.
C E172_StringLength Demonstrates String.Length property in Where clause.
C E173_TreeQueryGroupBy Demonstrates GroupBy aggregation on TreeQuery.
C E174_TreeQueryWindow Demonstrates Window Functions on TreeQuery.
C E175_TreeQueryGroupByWindow Demonstrates GroupBy + Window Functions on TreeQuery.
C E176_TreeDistinctBy Demonstrates DistinctBy on TreeQuery to get unique tree nodes by a Props field.
C E177_TreeDistinctByRedb Demonstrates DistinctByRedb on TreeQuery to get unique tree nodes by a base field.
C E178_TreeOrderBy Demonstrates OrderBy on TreeQuery to sort tree nodes by a Props field.
C E179_TreeOrderByDescending Demonstrates OrderByDescending on TreeQuery to sort tree nodes in reverse order.
C E180_TreeDistinctByOrderBy Demonstrates combining DistinctBy and OrderByDescending on TreeQuery.
C E181_DeleteSingle Demonstrates deleting a single object by ID.
C E182_DeleteBatch Demonstrates batch deletion of multiple objects.
C E183_FirstOrDefaultAsync Demonstrates FirstOrDefaultAsync to get a single object matching criteria.
C E184_WhereNullable Demonstrates filtering by nullable fields.
C E185_WhereBool Demonstrates filtering by conditions that can be simplified.
C E186_ObjectReference Demonstrates loading objects with RedbObject references.
C E187_UpdateExisting Demonstrates updating an existing object by loading, modifying, and saving it.
C E190_SumAsyncFiltered SumAsync with Where filter applied before aggregation.
C E191_WindowFiltered Window function with Where filter applied before windowing.
C E192_AggregateFiltered Multiple aggregations with Where filter applied before aggregation.
C E193_AverageAsyncFiltered AverageAsync with Where filter applied before aggregation.
C E194_MinMaxAsyncFiltered MinAsync/MaxAsync with Where filter applied before aggregation.
C E195_GroupByWindowFiltered GroupBy + Window with Where filter applied before grouping.
C ExampleBase Base class for all examples.
C ExampleMetaAttribute Attribute to mark example classes with metadata.