SqExpress Versions Save

SqExpress is a sql query builder which allows creating SQL expressions directly in C# code with strong typing and intellisense.

v1.0.0-beta

6 months ago

New Features

  • Retrieving of database tables metadata + comparison (works only for MS SQL so far)
  • MERGE expression builder

Breaking Changes

  • Values Constructor in MYSQL now is implemented through UNION ALL
  • .Net Framework is not supported anymore, however, .Net Standard 2.0 is still supported

v0.4.1

1 year ago
  • Bitwise operators (Warning! C# operator precedence is used)

v0.4.0

1 year ago

0.4.0.0

New Features

  • CTE (see readme.md)
  • SqQueryBuilder.ValueQuery(...) - It allows using a sub-query as a value (e.g. in boolean expressions or a column)
  • Powershell commandlets Gen-Tables and Gen-Models in Package Manager Console
  • Syntax Tree WalkThrough method has a new overload with a link to parent node
  • SqModels now have new methods: GetColumnsWithPrefix, ReadWithPrefix, IsNull, IsNullWithPrefix

Breaking Changes

  • Concat helper was renamed to Combine (to avoid a conflict with Linq)

v0.3.3

1 year ago

New Features

  • Support of DateTimeOffset
  • InsertInto(t, c1, c2, ...).Values(v1,v2,..).Values(v1,v2,..)...DoneWithValues()

Bugfix

  • StackOverflow on recursive foreign keys

v0.3.2

2 years ago

New Features

  • Cancellation Token for all db calls
  • Code-gen can be used with .Net 5 and 6 runtimes

v0.3.1

2 years ago

0.3.1.0

New Features

  • the DTO code-generator now has a parameter that allows generating C# records: --model-type ImmutableClass|Record or <SqModelGenType>ImmutableClass|Record</SqModelGenType>;
  • "CheckExistenceBy" in the Insert data builder what adds WHERE EXISTS(...) to a Insert source to avoid duplicates inserting;
  • ExistsIn<TTable>(..predicate..) ... - Helper that returns boolean expression EXISTS(SELECT 1 FROM TTable WHERE ..Predicate..)
  • QueryPage extension for OffsetFetch queries.

Bugfix

  • When some column(s) in values constructor contains only nulls, sqexpress now adds an explicit type cast for the first cell e.g. CAST(NULL as int)
  • MergeDataInto now allows only keys mapping unless WhenMatchThenUpdate is defined (without additional updates)
  • Derived tables now can have 0 declared columns

v0.3.0

2 years ago

New Features

  • "ReadAsString(recordReader:ISqDataRecordReader): string" and "FromString(value: string?): ExprLiteral" are added to TableColumn. They allow performing mass export/import of database data.
  • Lt Gt operators overload between columns
  • ColumnMeta is public now
  • Identity Insert
  • SqModelSelectBuilder - Fluent API that allows quickly get a tuple of DTO SqModels from tables join
  • Column method "Read" now has an overload that receives an ordinal index
  • "ReadOrdinal" was added to ISqModelReader
  • ThenBy for ExprOrderItem andExprOrderBy
  • ISqDatabase has a new overload for Query which receives an asynchronous record handler
  • Build targets to run model code-generation
  • new option "--clean-output" for the model code-generation tool

Breaking Changes

  • ISqModelDerivedReaderReader was removed. ISqModelReader was slightly changed;
  • CodeGenUtil - typo fixed in parameter "-v quiet"

v0.2.0

2 years ago

New Features

  • "MERGE" polyfill for PostgreSql and MYSQL
  • ISqModelReader;ISqModelUpdater (--rw-classes key in the code-generation utility)
  • SqModel for temporary and derived tables
  • Keep class modifiers in the code generation
  • New expression modifiers: AddOrderBy, AddOffsetFetch, JoinAsAnd, JoinAsOr
  • New query extension: QueryDictionary
  • ISqDatabase.BeginTransactionOrUseExisting(out bool isNewTransaction);
  • SyntaxTree().Descendants(); SyntaxTree().DescendantsAndSelf();
  • UpdateData builder

Bug Fix

  • ISqDatabase.BeginTransaction now does not throw an exception if connection was not opened (it is automatically opened on the first request)
  • Duplicates in model code-generation when one model is used for several tables

Breaking Changes

  • Some new methods were added in some public interfaces, so if you have own implementations then they need to be extended.

v0.1.0

3 years ago

New Features

  • Code-generation utility
    • Table descriptors scaffolding
    • DTO models generation
  • .Net Framework 4.5
  • Binary Column Type
  • Fixed Size String Column Type
  • Xml Column Type
  • Export/Import to JSON (for .Net Core 3.1+)
  • ISqDatabase.BeginTransaction()

Bugfix

  • Several Foreign Keys for one table column

v0.0.7.1

3 years ago

New Features

  • Cast does not require "Literal" for literals.

Bugfix

  • Explicit database name for tables in MySql