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

Oracle aliases limit #51

Open
Dolfik1 opened this issue Mar 3, 2017 · 2 comments
Open

Oracle aliases limit #51

Dolfik1 opened this issue Mar 3, 2017 · 2 comments

Comments

@Dolfik1
Copy link

Dolfik1 commented Mar 3, 2017

Oracle has limits to alias name. This limit is 30 characters.

Is possible to add support short name to alias? For example:

MyTable_Items_Msnt_Id
MyTable_Items_Msnt_Name

During the mapping replace MyTable_Items_Msnt_ to MyTable_Items_UnitOfMeasurement.

@lingster
Copy link

lingster commented Apr 7, 2017

I've faced similar issues. The oracle limit is raised to 128 bytes from Oracle 12.2 version onwards. Maybe this could be a temp workaround?

@Dolfik1
Copy link
Author

Dolfik1 commented Apr 8, 2017

I wrote this class for use short names:
https://gist.github.com/Dolfik1/78aa88a93d5197de41e0fa9afa28c316

Example of usage:

var data = Db.Query<dynamic>(query, new { idChanges });

var abbrs = new Dictionary<string, string>();
abbrs.Add("MaterialGroup_Ums", "MaterialGroup_UnitOfMeasurement");
abbrs.Add("Pressure_Ums", "Pressure_UnitOfMeasurement");
data = Abbreviations.Rename(data, abbrs);

This class will renames MaterialGroup_Ums to MaterialGroup_UnitOfMeasurement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants