Fix/remove ds store - #73
Open
enshetinin wants to merge 87 commits into
Open
Conversation
* Fixed nullability on migrations process (#34) * Fixed nullability on migrations process * Fixed format * Adding more types to the supported ones in the row mapper for tiberius * v0.1.1 * Refreshing and updating the GitHub actions for the project * Continuous integration runs only on main/develop. Upgrading the release action to its v2, and setting up it's content to directly publish the workspace * Adding a 15000ms of waiting between publishing every package in the release action --------- Co-authored-by: Gonzalo Busto Musi <35508741+gbm25@users.noreply.github.com> Co-authored-by: Alex Vergara <pyzyryab@tutanota.com>
…ince it's exceeding the capacity
…ies are now full parameterized.
…entity name (an struct identifier) to a database table name
* Cleaning the Result error handling by applying the operator ? whenever is possible * Refactored the parsing of the canyon entity macro
…the process. The monster trasmute for get a mutable reference to a connect due to the Tiberius query method has been eliminated
…t of the configuration for a datasource
…rrowed to owned types in the structs that holds the user configuration
…on file, by giving them a unique spot
…orward to get rid out of the db_type property, since it will be inferred from the auth declaration
…ation file. The in-use per datasource database type will be inferred from the auth key
… authentication system
…arget to enable integrated auth for tiberius (MSSQL)
…talling their missing system headers
…ing the installation of the gssapi headers to the others UNIX based actions
…inker issues under msvc envs
* #upgrade The Canyon database connector has been reworked, simpliying the process. The monster trasmute for get a mutable reference to a connect due to the Tiberius query method has been eliminated * db_type property of the properties of the datasource moved to the root of the configuration for a datasource * Bumped the toml dependency to 0.7.3. This forced us to change from borrowed to owned types in the structs that holds the user configuration * #feature - reworked the authentication properties for the configuration file, by giving them a unique spot * #feature - Auth property is mandatory for every datasource, looking forward to get rid out of the db_type property, since it will be inferred from the auth declaration * #feature - Removed the db_type field from the options of the configuration file. The in-use per datasource database type will be inferred from the auth key * #feature - Added a test for the `SqlServerAuth` integrated auth option * Adding the required features for working with the tiberius integrated authentication system * Separating with cfg features the conditional different libraries by target to enable integrated auth for tiberius (MSSQL) * Being more specific with targets for the CI process * Upgrading the Rust version for the VMs * Installing vendored OpenSSL * Trying for UNIX based systems to solve the issue with Kerberos by installing their missing system headers * Getting rid out of the installation of the openssl vendored. Propagating the installation of the gssapi headers to the others UNIX based actions * Adding the gssapi headers to the other steps. Bumped the syn deps * Disabling a doc tests in the canyon-macro module that was provoking linker issues under msvc envs * Correct typo in the CI action * v0.2.0 * #feature - #[cfg(feature = "mssql-integrated-auth")]
Changed "canyon_observer" to "canyon_migrations"
* Creating feature "migrations". Changed "canyon_observer" to "canyon_migrations" * WIP - Bringing back canyon_manager as canyon_entities * Refactoring functions rust datatype to database datatype to be standalone * Cargo fmt * Added lib and Cargo.toml for canyon_entities --------- Co-authored-by: Gonzalo Busto Musi <gonzalo.busto@gmail.com>
* Added 'like' operator. Removed unneeded whitespaces on queries. * Fixes for like operator. Added tests for like operators. * Upgrade to v0.4.1
* Added 'like' operator. Removed unneeded whitespaces on queries. * Fixes for like operator. Added tests for like operators. * Upgrade to v0.4.1 * Fix clippy warnings
* Fix for unspecified features * cargo fmt and clippy * Upgrade to v0.4.2 and added entry for the version in changelog * Correction of a comment * Test fix * Cargo fmt and clippy * Fix unused import clippy
* mysql-support start with docker configuration to up container and load data * mysql-support - first implementation workspace canyon_connection * mysql - change module bounds pending DateTime<OffSet> look problem and implement solution * mysql-support canyon macros, pending trait implement FromValue in &str and chrono:Date<OffSet> * mysql-support count table implemented * mysql-support - pending implement select test * mysql-support craete reorder array params to use with mysql params * mysql-support resolve quotes in queries and innecesary loop in reorder map * mysql-support select, update , and query_builder * mysql-support correction test insert and delete mysql implementation and investigate get last insert in mysql_async * develop remove imports not use * mysql-support added integration to returning primary key * mysql-support correction cfg features * mysql-support remove comment to mysql implementation in canyon_database_connector.rs * mysql-support canyon_macro.rs added in feature migrations * mysql-support replace error with feature in canyon_macro and separate pattern in crud.rs * changes: remove CanyonRowsMysql and implement mysql_async, repair initialization mssql * changes: corrections other test * changes: insert and multiinsert match_rows * changes: lib cargo_macros RowMapper * changes: select macro remove else if to generate tokenstream with action count * changes: resolve clippy error format! in expect to create Regex * changes: resolve clippy error format! in expect to create Regex * changes: implement Operator by datasource type * changes: added default datasources * changes: correction error feature specify in datasources.rs enum Auth * changes: correction cargo fmt --------- Co-authored-by: OnSystem <thihiddenonsystem@gmail.com>
… status (#59) * changes: readme, add repository canyon book
…on, in From<&Auth> for DatabaseType (#61) * changes: impl From<&Auth> for DatabaseType * changes: correction cargo fmt * changes: remove panic From<&Auth> * changes: remove doc empty * changes: cargo fmt
…o the conditionally compiled code
* feat: getting rid of the implementation indirections of Transaction input, avoiding storing intermediate state * feat: The DbConnection trait now is able to tell the client which is the underlying db type for the connection * test: re-enabled the integration tests of the SelectQuerybuilder * feat: re-enabled the insert and delelte operations * test: unit testing the generated tokens for the delete operations macros * test: unit testing the generated tokens for the delete with the querybuilder operations macros * feat: re-enabled the update operations * feat: re-enabled the multi-insert operations * feat: re-enabled the foreign key operations * feat: proc-macro hygiene on the implementation of the crud operations * feat: querybuilder read ops are hidden behind the same facade as the other read ops * chore: refactored the CanyonMapper macro into it's own file * chore: handle_stupid_tiberius_sql_conversions * chore: moving proc macro implementations from the root lib file of canyon_macros to their own separate modules * chore: moving DbConnection to db_connector:: * feat: removed #[async_trait] from all the codebase in favour of the impl Future * fix: update pk operations chore: getting concrete column value from row on CanyonRows * feat: impl of single row result operations * feat: renamed DbConnection::launch(self, ...) to DbConnection::query(self, ...) * feat: query_one to the public interface of Transaction * feat(wip): query_rows impl as the future replacement for the CanyonRows wrapper * feat(wip): reworking the new Transaction::query lifetime and type bounds * feat(wip): only postgres understand relaxing lifetime bounds * feat(wip): re-enabling mysql queries * feat(wip): re-enabling sqlserver on query * feat(wip): re-enabling all the read operations * feat(wip): re-enabling all the insert operations * feat(wip): re-enabling all the fk operations * feat: using the execute new op on the update to return the affected rows after the operation * feat: re-enabled all the crud operations again * fix: mssql parameter binding on query methods * chore: the macro template uses async fn syntax * chore: cleaning clippy warnings * chore: starting to clean the code around canyon connection and its exposed APIs * chore: removing the legacy way of retrieving a database connection * feat: Crud operations and transaction decoupling, reworking the bounds of all the associated types * fix: removing the unnecessary bound of CrudOperations on Foreign Key * feat(WIP!): adjusting the output type parameter on RowMapper across the dependent types * feat(WIP!): preparing the introduction of an EntityMetadata trait to dynamically retrieve the tokens that compose the RowMapper implementor on the queries * feat(wip): TLS issues with Tiberius since Rust 1.86 * feat(wip): proxy info via derive proc matro attr * fix: parsing the inner contents of the new canyon_crud annotation * feat: canyon_crud(maps_to = <Type>) annotation, to determine to which type Canyon Crud will map the results after the queries * clean: removed the x_unchecked operations from the public API * feat(wip): The querybuilder only needs bounds on DbConnection, Transaction got out of the public API * feat(wip): refactored the read ops file structure. Re-enabled the tests without the MacroOpsBuilder * feat(wip): making the querybuilder able to receive str and &str as DS params * feat(wip)!: marcho tomar café, que fai bo día! :) * feat: crud operations are finally implemented (along with the querybuilder ones) according to the new Transaction-DbConnection contract specifications * feat: upgrades to the internal macro implementation of the proc macros of the foreign key crud operations * perf: avoiding unnecessary Vec heap allocations on the pk macros when passing the target input parameter * refactor: upgrades to the `[canyon::main]` macro * perf: reworked almost every bit of the shared global state (or Canyon Context) to work with Arc<Mutex<...>>. Solved some other perf issues while looking for connections. Made the default user defined connection much faster to access. * refactor: getting rid out of lazy_static! * fix(test): tiberius target types on deserialization process that contains a whitespace due to quote! processing * fix(test): tiberius target types on deserialization process that contains a whitespace due to quote! processing * perf: By redesigning the public API of Canyon, we noticed an increase of a 8x on running the integration tests. This will likely impact the Canyon users with a massive performance boost * chore: legacy dead code cleanup * feat: new macro! to reduce the code required for implement str and &str for DbConnection * docs: canyon_core::connection * fix: doc-comments * fix: doc-comments examples with no_run to ignore * feat: splitting the behaviour of the implementors of QueryBuilder into a small subset of contracts, according each one functionality * feat: new type Query for having a fluent builder process from QueryBuilder -> Query Query is the DbConnection type now * feat: joins on the SelectQuerybuilder types now receive the join fields from the autogenerated enums, so the argument is now a code entity and not an str * feat: new auto-generated enum type that carries the meta-information of a type for giving the user reflection elements over the type ident and the type matching database table name generated by Canyon * fix: cargo fmt * feat: completed all the possible branches for the FromSql and FromSqlOwnedValue depending on what db configuration features exists * refactor: changed some re-exports of the public API that was in the incorrect crate * refactor: the crud_operations attribute in its `maps_to` argument is processed only once per procedural macro creation, and not per method invocation * refactor: little improvements on MacroTokens * fix: hiding non-relevant warnings that are raised when not all cfg features are enabled * feat: The Query type now implement AsRef<str> chore: removed the + Display bound on the generic statement parameters that receives the sql sentences * fix: missing the generics on the generated tokens for CrudOperations * feat(mssql-broken)!: updated the way on how the count crud operation is internally generated (Care:! We broke the Tiberius implementation because the type requeriments of their api for the moment, is pending to be fixed) * fix: missing the generics on the quote interpolation for the CanyonMapper proc macro * fix: correctly applying the generics on the macros for all the implementors of CrudOperations * perf: avoiding vec allocations on the insert query on CrudOperations to pass the query parameters * feat: row_mapper methods now returns the value wrapped on Result, leading to a much better hygiene on the derive proc macro * chore: raised Rust edition to 2024 * fix: removed unneeded Debug + Clone derives in the autogenerated enums of Fields * fix: removed unneeded Debug + Clone derives in the autogenerated enums of Fields * refactor(wip): towards a better default CrudOperations that doesn't use Transaction * refactor(internal): cleaned the insert operation macro tokens generators * feat(wip)!: adding the insert entity variants for insert data given some T with CrudOperations that inserts any other RowMapper type * fix: now, if there's some proc_macro_attribute with the maps_to for CanyonCrud, is taken in consideration for the table_schema_data generation before the default one * feat: entity insertions (default and with) available on CrudOperations * feat: avoiding deadlocks by explicitly return the DbConnection from Canyon in the Arc Mutex, so is the user the one responsible for acquiring the lock over the resource * feat: Query constructor * feat: Row Mapper tokens are now handled by MacroTokens * feat: easier way of handling the fields_values returned by Inspectionable * refactor: macro tokens method operations decoupled to helpers, so it can be used by another trait impls * refactor: reducing the number of collections allocations by returning iterators from th e helpers and allocating only when needed * fix: now the insert entity ops receives the correct values for the queryparameters to be updated * feat: update entity implementations * feat: delete entity implementations * feat(wip)!: setting the value returned of the pk on the insert entity operations, but lifetime problems arises * feat(wip)!: saving intermediate smokes * fix(wip)!: mapper target type will be correctly calculated when the pk must be known at runtime (entity) * feat: entities got the inserted returned value of the pk auto-assigned back * chore: cleanup * chore: simplifying back macro tokens * fix: relaxing lifetime bounds that wasn't correctly specified between in and out params on crud operations * feat(wip)!: provisional blanket implementation for any T that's DbConnection and is wrapped on Arc Mutex combo * feat(wip)!: implementing u32 for QueryParameter types (not for tiberius, as usual, which will panic). We should wrap all the QueryParameter methods output with Result * chore: intermediate code cleaning * fix: improper lifetime bounds on the delete methods of the CrudOperations trait * feat: FieldValues autogenerated enums takes the concrete type of the column, not QueryParameter anymore * chore: simplified the implementation and definition of FieldValueIdentifier * chore: simplified the implementation and definition of QueryParameter, that now does not have a lifetime bound * fix: solved the update entity bug * chore: cognitive refactor of the complexity of the impl of inspectionable * fix: removing undesired lifetime bounds on the insert operations * fix: removing undesired lifetime bounds on the insert operations * refactor: removed find pk by fields for MacroTokens on the public API * refactor: PrimaryKey get direct info about the index position on the fields of the attached struct for the annotation * fix: correcting the update pk index to make the placeholder work in the queryparams * refactor: getting rid of the Arc<Mutex>> pattern when accessing db connections * fix: MSSQL count operation with our 'query_one_for::<T>' * feat: implement connection pooling for performance optimization - Add ConnectionPool with VecDeque-based connection management - Add PooledConnection wrapper with automatic connection return - Add PoolManager global singleton for managing multiple pools - Implement DbConnection trait for PooledConnection - Fix MSSQL COUNT(*) issue by handling i32->i64 conversion - Update macro-generated code to handle database-specific COUNT(*) types - Add pool module to connection module exports - All 53 tests passing with significant performance improvements This implementation provides: - Automatic connection reuse and lifecycle management - Thread-safe connection pooling with Arc<Mutex<>> - Non-blocking async connection return via tokio::spawn - Database type awareness for proper type handling - Seamless integration with existing Canyon-SQL APIs * fix: revert async Canyon API and remove pool initialization from macro - Revert Canyon::get_connection and get_default_connection back to synchronous - Remove pool import from Canyon since it's not being used yet - Fix compilation errors by reverting async changes in macros and migrations - The pool implementation exists but is not integrated into the main flow yet The current issue is that the macro is trying to initialize database connections during compilation, which is causing connection errors. The pool should only be used at runtime, not during macro expansion. * feat: add optimized connection creation for better performance - Add new_optimized() method to DatabaseConnection for performance-critical operations - Implement optimized PostgreSQL connection with better timeout and keepalive settings - Add optimized MSSQL connection with TCP optimizations - Add optimized MySQL connection with pool constraints - Keep existing API unchanged for backward compatibility - Provide foundation for connection pooling integration This addresses the performance issues by: - Reducing connection establishment overhead - Adding connection keepalive settings - Optimizing TCP settings for better throughput - Maintaining backward compatibility with existing code The optimized connections can be used for performance-critical operations while keeping the existing API unchanged. * Revert "fix: MSSQL count operation with our 'query_one_for::<T>'" This reverts commit 863e679. * Reapply "fix: MSSQL count operation with our 'query_one_for::<T>'" This reverts commit b503bc7. * reapply: the fix on the mssql code generation * fix: compiler lints about unnecessary parenthesis * fix: new clippy lints on v.1.90 onwards for the migrations module * fix: new clippy lints on v.1.90 onwards for the core module * fix: new clippy lints on v.1.90 onwards for the macros module * fix: eliminating the warning about the mssql cfg feature on client code * fix: different approach for the cfg_if * feat(wip)!: Initial implementation of a real connection pooling * feat(wip)!: Unifying the pool within the database connection type * feat: connection pooling for all the supported databases * chore: renamed DatabaseConnection to DatabaseConnector * refactor: clients got again their own db caller code * refactor: custom macro for reduce the code of the implementation of DbConnection for DatabaseConnector, owned, ref and mut ref types * refactor: connections and pool creation moved to their wrapper client types * refactor: default ports for each kind of supported database * fix: missing cfg features * refactor(WIP): Querybuilder public interface * refactor(WIP-2)!: Querybuilder public interface * refactor(WIP-3)!: Querybuilder public interface * refactor(WIP-4)!: Querybuilder public interface * refactor(WIP-5)!: Querybuilder public interface * fix: removed async modifier on DatabaseType default_type * refactor: more querybuilder public interface * refactor(WIP)!: querybuilder now is made of AST types for query generation * refactor(WIP)!: querybuilder now is made of AST types for query generation * refactor(WIP)!: querybuilder now is made of AST types for query generation * refactor(WIP)!: querybuilder now is made of AST types for query generation * refactor(WIP)!: querybuilder now is made of AST types for query generation 2 * refactor(WIP)!: rollback the introduction of the querybuilder on the crud operations macros * refactor(WIP)!: convertions from types that makes sense on the join clause params * chore: cargo fmt * refactor(WIP)!: towards a better token emission phase * refactor(WIP)!: given the emitters real entity like behaviour * refactor(WIP)!: making the AST downcasteables to resolve the type at runtime * refactor(WIP)!: emit_columns shared logic. New helpers mod for the shared emission impl details * refactor(WIP)!: 1 * refactor(WIP)!: ToSqlTokens now returns a lazy generator, instead of taking the out collection by mut reference * refactor(WIP)!: Select tokens has now a complete lifecycle on the querybuilder * refactor(WIP)!: Insert tokens * refactor(WIP)!: Insert impl * refactor(WIP)!: querybuilder whitespaces(); * refactor(WIP)!: operator from Comp to Operator type * refactor(querybuilder helpers test)!: redone * refactor: fixed the LBracket for mssql query generator * refactor(wip)!: refactoring unit tests! * refactor(wip)!: consuming the sqltokens at render time instead of taking them by mut ref * refactor(wip)!: consolidating the querybuilder tests * fix: empty canyon_entity proc macro was requiring strange empty brackets * feat: custom types for Ranged elements * chore: writer.rs doesn't care anymore about creating tokens * chore: removed SqlToken whitespace from the codebase, since modeling " " at code level was being more disturbing that beneficious * chore: opts to the writer new logic * chore: re-enabling querybuilder like concat tests * fix: update set-values method * feat: autogenerated enum field values are now returning ColumnRef in the tuple with the value instead of str * fix(wip): borrowing issues on with_columns for the select_querybuilder * feat: avoiding using unneeded Result when constructing any kind of querybuilder * fix: mysql params was being used incorrectly * fix(perf): more mysql client opts * chore: compose updates * chore: minors * chore: cleaning unused crate deps * chore: creating some new const associated functions to construct the inner querybuilder elements at compile time * refactor(syn)!: field_annotation migrated and refactored syn version raised to major (2) * refactor(syn)!: helpers.rs * refactor(syn)!: macro_tokens.rs * refactor(syn)!: syn v2 migration * refactor(syn)!: minors * fix: wrong value-index params counter for the values-in methods * feat(WIP)!: now the build method for the concrete instances of the querybuilder is mandatory due to it's related type bound: QueryBuilderOps * feat(WIP)!: guárdame-esta * feat: finally really introducing the QueryBuilder to the macro queries * feat: new const new fn for the qerybuilder * feat: InsertQuerybuilder * feat: replacing the find_all methods to use the QueryBuilder * feat(WIP!): fk operations are being adecuated to use querybuilder * feat(WIP!): fk child operations are being adequate to use querybuilder * faet: fk operations refactor * feat: using the querybuilder on the foreign key * fix: missing dbtype on fk querybuilder * feat(wip): refactor of the insert macro to user querybuilder * feat(wip): refactor of the insert macro to user querybuilder * feat(wip)!: towards static dispatch on the backend emitters * feat(wip)!: cleaned unused placeholder query params functions * feat(wip)!: insert with the new static dispatch model on the querybuilder * chore(wip): partial cleanup of the AstProcessor dependent code for the emitters * feat(wip)!: finishing the reformulation of the querybuilder internal dispatch method * chore: cleanup * feat(wip)!: qualification of the emitted columns * feat(wip)!: qualification of the emitted columns * feat(wip)!: redo of the update macro to use the querybuilder * fix(wip)!: avoiding to update the fk * fix(wip)!: avoiding to update the fk * feat: refactor of the update method * feat: refactor of the delete method * feat: refactor of the find by pk methods * feat: update entity with the QueryBuilder * fix: COUNT(*) previous whitespace on MySQL * fix: find_by_primary_key entity operations was retrieving wrong table name * fix: find_by_primary_key entity operations was retrieving wrong table name * chore: cleaning Inspectionable (changed to EntityRuntimeInfo) * chore: cleaning legacy placeholders generators code * chore: DRY for the default db conn init * feat: Delete entity operations are now constructed with the QueryBuilder * chore: docs for the Querybuilder types * chore: more regular code cleanup * fix: obsolete querybuilder tests * chore: obsolete code cleanup * chore: more code cleanup * fix: MySql DB client implementation * chore: disabled and removed the Integrated auth of MsSql due to the annoying coupling with the gssapi headers * chore: removed the gssapi installation on upstream * fix: corrected intra-links docs * feat(wip)!: splitting CRUD into more granular macros * feat(wip)!: canyon macros getting even more granular * feat: Canyon big refactor finally completed * fix: broken intra-doc link * feat: redone the FromSql and FromSqlOwned trait bounds * chore(WIP)!: redone the querybuilder constructors to make them compile time const * chore: refactoring query querybuilder inits * chore: removed cfg-if * chore: fine-tuning the migrations feature for more granular control * fix: querybuilder operations was missing the correct db type for some operations * fix: correcting the dependency graph for canyon migrations - migrations feature * chore: cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove .DS_Store file from the project