Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T4 models and empty column names #5

Closed
ghost opened this issue Mar 4, 2013 · 0 comments
Closed

T4 models and empty column names #5

ghost opened this issue Mar 4, 2013 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 4, 2013

Create procedure:

create procedure x_select_implicit_column
as
begin
select 123
end
go

In this case T4 models generates wrong next output:

#region x_select_implicit_column

public partial class x_select_implicit_columnResult
{
    public int  { get; set; }
}

public static IEnumerable<x_select_implicit_columnResult> x_select_implicit_column(this DataConnection dataConnection)
{
    return dataConnection.QueryProc<x_select_implicit_columnResult>("[x_select_implicit_column]");
}

#endregion

UPD: Of course there can be many column names without names (generate new names?). It is hard to diagnose (without knowledge of procedure for which failed generation). It is just from existing production database.

viceroypenguin added a commit that referenced this issue May 16, 2024
MaceWindu added a commit that referenced this issue May 29, 2024
* Corrected SqlServer update with hints.

* Fixed test's assertion.

* Fixed comparison generation regression.

* Fixed SqlCe update table name generation.

* Fix Oracle's empty string compare.

* Fixed multithreading serialization issue.

* Fixed CancellableAsyncEnumerableTest.

* Enabled IsCrossJoinSupported for Informix.

* Enabled more Update tests.

* Firebird parameter fixes.

* ClickHouse nested joins fix

* don't use conditionals in-test

* print diff for baselines conflicts

* Added various optimization support for aggregation functions inside GROUP BY body.

* Cleanup GroupBy Aggregation code.

* Fixed wrong code analysis.

* Disabled test for MariaDB.

* Fixed Access regression.

* PostgreSQL do not support float modulus operator, added needed conversions.

* Sybase Update fixes.

* Sybase test fixes.

* Fixed member ordering conflict between runtimes.

* Added replacements for pseudo function CASE. (#4455)

Added replacements for pseudo function CASE.

* Restored DataProviders.json

* Corrected Precedence.

* Fixed subquery optimization regression.

* Improving optimization.

* Improved Case Expression optimization.

* Fixed OrmBattleTests.

* Corrected Northwind Model to use properties instead of fields.

* Updated SapHana ODBC provider flags.

* Optimization fixes.

* Removed unnecessary truncation.

* Fixed Firebird prameters.

* Introduced flexible member translation mechanism. Cleaning Expressions.cs. Created SqlCastExpression.

* Added missing DateOnly conversions. Test fixes.

* Fixed multi-threading issue.

* Fix Update parameters regression.

* Disabled SapHana server side Guid generation.

* Date functions translation cleanup.

* Improved SQL Server date time creation.

* Fix SQL Server's type conversions.

* Fix ClickHouse conversion function.

* Fixed AggregationBuilder regression.

* Disabled not supported test.

* add clickhouse client decimal conversion issue workaround

* simplify calls

* Fixed wrong join optimization handling.

* Fixed ClickHouse mapping issues.

* Fixed GetValueOrDefault translation.

* Fix Grouping regression.

* Setting for constant concrete type.

* Revert Clickhouse join optimization.

* ClickHouse conversion fix.

* Sqlite DateTime parameters fix.

* Limited SQLite test.

* Fixed SQLServer 2005 tests.

* Fixed SqlCe MakeDateTime.

* Fixed SQL Server's Cast to Time regression.

* Access fixes.

* Fixed SapHana provider.

* Fixed DB2 translation.

* Sql.Types cleanup.

* Fixed parameter type regression.

* Many fixes for Informix. Other found issues.

* Disabled optimization cache.

* Hide ServiceProvider property from IDataContext.

* Fixed Output conversion regression.

* Relaxed grouping guard for test.

* Re-implemented support for QueryFilter as function.

* restore nullable type mapping

* fix window function flag for firebird/mysql

* Improved join subquery optimization.

* SapHana parameters fix for LATERAL joins.

* Disable SapHana non-applicable tests.

* - reenable all set tests

- fix sql optimizer subclassing test

* fix boolean conversion codegen for fb3+

* Cleanup Sql.NewGuid().

* Fixed Sybase tests.

* [fb] fix non-boolean parameter as predicate

* [fb] improve boolean fix

* [fb] fix null string cast issues in FB 2.5

* correct ConditionalExpression.Test build

* ParametersContext fix

* parameter accessor fix

* - a bit of data parameter refactoring

* remove unfair (to DataParameter) condition

* restore not merged change

* fix SearchString predicate evaluation

* correct mapping

* revert bad fix

* restore wrong revert

* more proper char size fix

* fix firebird tests

* fix unstable test

* fix missing null value typings

* fix typo

* rework fix

* Query caching closure removing for dynamic accessors.

* undo remaining nested joins after unnesting for databases without nested joins support

* got it

* - fix sybase legacy joins

- enable bunch of now working clickhouse tests
-  disable some unsupported tests

* Improved error handling for associations.

* Fixed SqlValue typisation for Set operations.

* restore trim functions for sybase

* Fixed subqueries validation for Oracle and MySql.

* Fix association check regression.

* Regression fix.

* disable tests that shouldn't have worked before if we used parameters as expected here

* disable unsupported test, cleanup sybase setup

* newguid translation disabled for sap hana

* Another cast with custom expression parameters.

* Moved optimization part to right place.

* Math.Min and Math.Max translation refactoring. Minor translation fixes.

* Added missing files.

* Added workaround over Oracle's bug.

* New Oracle option for checking supported query nesting.

* Refactored Aliases assigning. Introduced IIdentifierService.

* Many Sybase fixes.

* Fix remaining Sybase tests.

* Fixed aliases generation.

* fix merge, redirect baselines to intermediate branch for manual review

* Fix COUNT nullability.

* Changed Count case.

* Improved DISTINCT optimization.

* remove unused file

* reenable some working now tests

* disable some enabled tests

* enable more passing tests

* Code review fixes.

* Corrected nullability calculation for optimized queries.

* Fixed wrong Insert parametrization.

* minor review changes

* what and why?

* Fixed ParameterAccessor memory leak. Enabled MemoryLeak test.

* enable missing flag for SAP HANA provider

* Clear unnecessary columns.

* fix release build

* fix regression and use proper names/nullability to avoid confusion

* test CH behavior

* remove unnecessary calls to OmitUnsupportedCompareNulls

* fix typo

* Made only DefaultValueExpression as fail for projection.

* Optimize out not used aggregation columns.

* IN Subquery optimization.

* Optimization regression fix.

* review

* Version 6 review fixes (#4495)

* Improved GroupBy Key translation.

* Fixed unnecessary column generation.

* Added InList predicate optimization.

* Improved ExpressionEqualityComparer for comparing MemberExpression.

* Join optimization fixes.

* Removed unnecessary condition.

* Added missing files.

* Fixed unnecessary parameter casting for Firebird and DB2.

* IN List optimization fixes.

* Subquery optimization fixes.

* Optimization improvements.

* Corrected CTE nullability.

* Better GroupBy subquery optimization.

* typo in tests

* disable test

* Fixed unnecessary subquery generation for SQL Server.

* Added support for IQueryExpressionInterceptor, IMemberTranslator via DataOptions. (#4479)

* Added support for IQueryExpressionInterceptor.

* Better pattern matching usage.

* Simplified Interceptors code.

* Added possibility to register own member translator. Refactored options applying.

* Reverted DataOptions refactoring.

* Hide ServiceProvider from IDataProvider.

* tabs vs spaces

---------

Co-authored-by: MaceWindu <MaceWindu@users.noreply.github.com>

* split clickhouse testruns

* Delete/update take/skip/order support (#4498)

* review

* enable take/skip/order for DELETE/UPDATE for supporting databases

* re-disable tests

* disable tests

* move method to helpers

* disable test

* Fixed LinqService optimization regression.

* Ignore boolean parameters database mapping.

* Restored predicate optimization.

* Fixed search condition duplication.

* Fixed LinqService wrong BETWEEN fallback.

* More predicate optimization.

* code review

* IsNull optimizations.

* Relaxed removing tableless subqueries.

* CR

* Added additional wrapping for SetOperationContext.

* Another IsNull optimization.

* Reverted wrong optimizer.

* Fixed failing test.

* CR

* add additional eager load tests

* rise exception on read-only eager load association

* nobody cares tbh

* Corrected ClickHouse test.

* CR

* code-review

* flags cleanup

* remove no-op method

* reenable and fix bad test

* reenable tests

* SqlRow fixes.

* Fixed association's join generation.

* benchmarks

* Made fields as properties for stable baselines.

* Corrected Cardinality and SqlRow handling.

* Fixed constant mapping.

* Fixed OrderBy by entity regression.

* Fixed Firebird DateAdd generation.

* Test fixes.

* fix linq2db.fsharp build

* fix merge

(cherry picked from commit a7c54a3)

* fix typo

* Fixed DateAdd for Firebird5

* Fixed parameters generation.

* Code cleanup.

* Fixed extensions regression.

* Restored parameter name.

* final touch

* test for issue #4390 (#4391)

* test for issue #4390

* Corrected tests.

---------

Co-authored-by: Svyatoslav Danyliv <sdanyliv@gmail.com>
Co-authored-by: MaceWindu <MaceWindu@users.noreply.github.com>

* Cleanup #1

* Cleanup #2

* Cleanup #3

* Cleanup #4

* Fix build issue

* Remove excess blank lines

* Cleanup #5

* Changed base class for SqlAnchor.

* Cleanup #6

More aggressive pattern matching; can be reverted if desired

* Cleanup #7

* Correct property spelling

* Cleanup #8

* Fix build issue

* Fix case issue

* More informative exceptions.

* Fix `Stuff` bug

* Cleanup #9

* Use `switch` statements instead

* Cleanup #10

* Cleanup #11

* Fix build.

* Cleanup #11

* Cleanup #12

* Add `global.json` to block preview SDKs

* Address build issue

* Cleanup #13

---------

Co-authored-by: MaceWindu <MaceWindu@users.noreply.github.com>
Co-authored-by: Jochen Kühner <jochen.kuehner@kardex.com>
Co-authored-by: Stuart Turner <stuart@turner-isageek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant