Skip to content

Releases: malikhan-dev/zenql

v1.8.0

10 Jun 15:58
411de9f

Choose a tag to compare

v1.8.0

1 - explicit mapping function is no longer required on FromSqlRows(). built-in mapper added

    cursor := FromSqlRows[UserModel](ctx, conn,"select * from Test.users where id>?", id)

	if cursor.Initiated {
		for v := range cursor.FilterStream(func(model UserModel) bool {
			return model.Age > 25
		}).Throttle(time.Millisecond * 1000).Channel {

				/// business logic

			}
	}

2 - deprecations removed (default collections api and etc)

3 - memory enhancement for Thor Collections Api

4 - 'zdb' tags renamed to 'zql' tags. the mapping contract.

v1.7.9 (Thor Api Memory Optimizations)

07 Jun 09:31
8c30277

Choose a tag to compare

Thor Api

  • the From() function accepts pointers from now on.

  • memory allocations reduced dramatically.

  • huge performance improvement.

new way:

result := From(&items).Where(func(search ComplexObjectToSearch) bool {
		return search.Name == "Jane" && search.Flag == false
	}).Collect()

benchmark on 50,000,000 records filter:

  goos: linux
  goarch: amd64
  pkg: github.com/malikhan-dev/zenql/collections/Thor
  cpu: 12th Gen Intel(R) Core(TM) i7-12700H
  BenchmarkQueryEngine
  BenchmarkQueryEngine-20               88          13636313 ns/op        22727310 B/op          0 allocs/op
at Thor_Engine__test.go 

func BenchmarkQueryEngine(b *testing.B) {

	result := From(&items).Where(func(search ComplexObjectToSearch) bool {
		return search.Name == "Jane" && search.Flag == false
	}).Collect()

	result2 := From(&result).Any(func(search ComplexObjectToSearch) bool {
		return (search.Name != "Jane") || (search.Flag != false)
	}).Assert()

	if result2 {
		b.Error("result should be false")
	}

} 

database module

dynamic database for each test run added for postgresql

v1.7.8 Sorting

05 Jun 16:39
f79f9ee

Choose a tag to compare

V1.7.8

Thor-Collection-Api

Introducing CollectSorted(). sort and collect the result by ascending or descending order. easier implementation of the heap data structure. dont repeat yourself by implementing Heap Interface everytime.

	result := From(personList).Where(func(person Person) bool {
		return person.Active == true
	}).CollectSorted(func(person Person, person2 Person) bool {
		return person.Identifier < person2.Identifier
	}, true)

Database Module

  • Minor Refactor
  • Performance Improvement
  • Dynamic Tests. (a seperated database creation and testing on each test run)
  • Code Coverage Improved

v1.7.7 - implementing sort functionality

05 Jun 15:07
fd959e7

Choose a tag to compare

V1.7.7 (Pre-release)

v1.7.6

01 Jun 16:44
1c4a810

Choose a tag to compare

pg

Postgresql Support

Zenq Operations Supported On Postgresql database

Db Transactions Support

Rollback() or Commit The Active Transaction On The DbContext (RDBMSFacade)

Generic Facade To Access Sql Databases

Its Possible To Access Any Sql Database By Implementing The RDBMSFacade interface. at the moment MySql and Postgres Implemented

Breaking Changes:

FromMySqlRows() renamed to FromSqlRows()

Copyright Notice:

Third‑Party Software Notice: This package includes/uses the third‑party MySQL driver github.com/go-sql-driver/mysql.
Copyright © The github.com/go-sql-driver/mysql authors.

Third‑Party Software Notice: This package includes/uses the third‑party Postgres driver github.com/lib/pq
Copyright © The github.com/lib/pq authors.

License applies as stated in those repository.

v1.7.5 (MySql-Support)

30 May 19:15
184014a

Choose a tag to compare

Support MySql DataSource In Zenq.

IMPORTANT:

Third‑Party Software Notice: This package includes/uses the third‑party MySQL driver go-sql-driver/mysql.

Copyright © The go-sql-driver/mysql authors.

Project page: https://github.com/go-sql-driver/mysql

License applies as stated in that repository.

v1.7.4 (MySql Support)

30 May 19:11
014e933

Choose a tag to compare

Pre-release

Support MySql DataSource In Zenq.

IMPORTANT:

Third‑Party Software Notice: This package includes/uses the third‑party MySQL driver go-sql-driver/mysql.

Copyright © The go-sql-driver/mysql authors.

Project page: https://github.com/go-sql-driver/mysql

License applies as stated in that repository.

v1.7.3 (MySql Support)

30 May 19:02
60f3a55

Choose a tag to compare

Pre-release

Support MySql DataSource In Zenq.

IMPORTANT:

Third‑Party Software Notice: This package includes/uses the third‑party MySQL driver go-sql-driver/mysql.

Copyright © The go-sql-driver/mysql authors.

Project page: https://github.com/go-sql-driver/mysql

License applies as stated in that repository.

v1.7.2.1

26 May 10:05
56a0dd2

Choose a tag to compare

Error checking when initiating a stream from an async data-source. (csv , json and etc)

if stream:= streams.FromCsv(ctx, CsvStreamConfig); stream.Initiated{

CsvData := stream.FilterStream(func(c customer) bool {
	return c.Index > 0
}).TakeAll()

} 

v1.7.2

26 May 09:59
eb997c5

Choose a tag to compare

v1.7.2 Pre-release
Pre-release
Error checking when initiating a stream from an asynch data-source. (csv , json and etc)

if stream:= streams.FromCsv(ctx, CsvStreamConfig); stream.Initiated{

CsvData := stream.FilterStream(func(c customer) bool {
	return c.Index > 0
}).TakeAll()

}