forgebase_sdk library
A Dart/Flutter client SDK for ForgeBase
Classes
-
AggregateOptions<
T> - Options for aggregate functions
-
ApiResponse<
T extends Map< String, dynamic> > - Response from the API
-
CacheConfig<
T extends Map< String, dynamic> > - Query cache configuration
-
CTE<
T extends Map< String, dynamic> > - A Common Table Expression (CTE)
- DatabaseSDK
- The main SDK class for interacting with the ForgeBase database.
- ExplainOptions
- Options for EXPLAIN queries
-
HavingClause<
T> - A having clause for filtering grouped data
- JoinCondition
- Join condition for subqueries
-
OrderByClause<
T> - An order by clause for sorting data
-
PivotConfig<
T> - Configuration for pivot transformations
-
QueryBuilder<
T extends Map< String, dynamic> > - A builder class that provides a fluent API for constructing database queries.
- QueryOptions
- Options for query execution
-
QueryParams<
T extends Map< String, dynamic> > - Parameters for querying data
- QueryValidation
- Query validation rules
- RawExpression
- A raw SQL expression with optional bindings
-
RecursiveCTE<
T extends Map< String, dynamic> > - A recursive Common Table Expression (CTE)
- SubQueryConfig
- Configuration for subqueries in where exists clauses
-
TransformConfig<
T> - Configuration for transforming query results
- ValidationRules
- Rules for query validation
-
WhereBetweenClause<
T> - A where between clause for range filtering
-
WhereClause<
T> - A where clause for filtering data
-
WhereGroup<
T> - A group of where clauses combined with a logical operator
- WindowFrame
- Window function frame configuration
-
WindowFunction<
T> - Configuration for window functions
-
WindowFunctionAdvanced<
T> - Advanced window function configuration
-
WindowOver<
T> - Window function OVER clause configuration
Enums
- AggregateType
- The type of aggregate function to apply
- GroupOperator
- Defines the logical operators for combining where clauses
- NullsPosition
- Defines how nulls should be sorted
- SortDirection
- Defines the sort direction for orderBy clauses
- WhereOperator
- Defines the available operators for where clauses
- WindowFunctionType
- The type of window function to apply
Extensions
Functions
-
deepMerge<
K, V> (Map< K, V> map1, Map<K, V> map2) → Map<K, V> - Deep merges two maps.
-
flatten(
Map< String, dynamic> map, {String separator = '.', String? prefix}) → Map<String, dynamic> - Flattens a nested map into a single level map.
-
groupBy<
T, K> (List< T> items, K keyFunction(T)) → Map<K, List< T> > - Groups a list of maps by a specific key.
-
isBoolean(
dynamic value) → bool - Checks if a value is a valid boolean.
-
isList(
dynamic value) → bool - Checks if a value is a valid list.
-
isMap(
dynamic value) → bool - Checks if a value is a valid map.
-
isNullOrEmpty(
dynamic value) → bool - Checks if a value is null or empty.
-
isNumber(
dynamic value) → bool - Collection of utility functions for the ForgeBase SDK. Checks if a value is a valid number.
-
isString(
dynamic value) → bool - Checks if a value is a valid string.
-
pivot<
T> (List< T> items, String pivotColumn, List<String> values, String aggregateColumn, {String valueTransform(dynamic)?}) → List<Map< String, dynamic> > - Pivots a list of maps using the specified configuration.
-
toQueryString(
dynamic value) → String - Converts a value to a string for URL encoding.
-
unflatten(
Map< String, dynamic> map, {String separator = '.'}) → Map<String, dynamic> - Unfolds a map with dot notation keys into a nested map.
Exceptions / Errors
- ForgeBaseException
- Custom exception for ForgeBase errors