Version 4 #6
No reviewers
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
infrastructure
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: bit-badger/BitBadger.Documents#6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "version-four"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes in this version:
*byField
/*ByField
functions are now*byFields
/*ByFields
, and take aFieldMatch
case before the list of fields. TheCompat
namespace in both libraries will assist in this transition. In support of this change, theField
parameter name is optional; the library will generate parameter names for it if they are not specified.Query
namespaces have had some significant work, particularly from the full-query perspective. Most have been broken up into the base query and modifiersby*
that will combine the base query with theWHERE
clause needed to satisfy the criteria.Query
breaking changes, as the fields need to have their intended value for the library to generate the appropriate SQL. Additionally, if code assumes the library can be given something like8
and transform it to"8"
, this is no longer the case.Find
queries (exceptbyId
/ById
) now have a version with theOrdered
suffix. These take a list of fields by which the query should be ordered. A newField
method calledNamed
can assist with creating these fields. Prefixing the field name withn:
will cast the field to numeric in PostgreSQL (and will be ignored by SQLite); adding " DESC" to the field name will sort it descending (Z-A, high to low) instead of ascending (A-Z, low to high).fieldNameParam
/Parameters.FieldName
are now plural. The function still only generates one parameter, but the name is now the same between PostgreSQL and SQLite. The goal of this library is to abstract the differences away as much as practical, and this furthers that end. There are functions with these names in theCompat
namespace.List
type, and the C# version took eitherList<T>
orIEnumerable<T>
. In this version, these all expectseq
/IEnumerable<T>
. F#'sList
satisfies theseq
constraints, so this should not be a breaking change.Field
s now may have qualifiers; this allows tables to be aliased when joining multiple tables (as all have the samedata
column). F# users can usewith
to specify this at creation, and both F# and C# can use theWithQualifier
method to create a field with the qualifier specified. Parameter names for fields may be specified in a similar way, substitutingParameterName
forQualifier
.