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

Enhancement: Add the attribute-based parameter setters for the DbParameter object. #886

Closed
mikependon opened this issue Sep 13, 2021 · 3 comments
Assignees
Labels
deployed Feature or bug is deployed at the current release enhancement New feature or request fixed The bug, issue, incident has been fixed. priority Top priority feature or things to do todo Things to be done in the future

Comments

@mikependon
Copy link
Owner

mikependon commented Sep 13, 2021

Describe the enhancement

To further support the setting of most properties of the DbParameter object before the actual execution, please add following attributes.

Usage

public class EntityClass
{
      [DbTypeAttribute(DbType.String)]
      [DirectionAttribute(ParameterDirection.Input)]
      [NameAttribute("CompleteName")]
      [PrecisionAttribute(1)]
      [ScaleAttribute(10)]
      [SizeAttribute(256)]
      public string Name { get; set; }
}

DbParameter

Add the following attributes.

  • DbTypeAttribute
  • DirectionAttribute
  • IsNullableAttribute
  • NameAttribute
  • PrecisionAttribute
  • ScaleAttribute
  • SizeAttribute

All the mentioned attributes must inherit from the PropertyValueAttribute attribute.

SqlParameter (SQL Server)

  • CompareInfoAttribute
  • DataTypeNameAttribute
  • ForceColumnEncryptionAttribute
  • LocaleIdAttribute
  • OffsetAttribute
  • SqlDbTypeAttribute
  • XmlSchemaCollectionNameAttribute
  • XmlSchemaCollectionDatabaseAttribute
  • XmlSchemaCollectionOwningSchemaAttribute

NpgsqlParameter (PostgreSQL)

  • ConvertedValueAttribute
  • DataTypeNameAttribute
  • NpgsqlDbTypeAttribute

MySqlParameter (MySQL)

  • MySqlDbTypeAttribute

MySqlParameter (MySQL Connector)

  • MySqlDbTypeAttribute

SQLiteParameter (System)

  • TypeNameAttribute

SqliteParameter (Microsoft)

  • SqliteTypeAttribute
@mikependon mikependon added the enhancement New feature or request label Sep 13, 2021
@mikependon mikependon self-assigned this Sep 13, 2021
mikependon added a commit that referenced this issue Sep 13, 2021
#886 Added the necessary parameter property value setter attributes.
@mikependon mikependon added the fixed The bug, issue, incident has been fixed. label Sep 13, 2021
@mikependon
Copy link
Owner Author

This will be available on the next build > RepoDB v1.12.8-beta4.

@mikependon mikependon reopened this Sep 15, 2021
@mikependon mikependon added priority Top priority feature or things to do todo Things to be done in the future and removed fixed The bug, issue, incident has been fixed. labels Sep 15, 2021
@mikependon mikependon pinned this issue Sep 15, 2021
mikependon added a commit that referenced this issue Sep 17, 2021
…lignment when being called to the actual operations.
mikependon added a commit that referenced this issue Sep 17, 2021
#886 Added the PropertyHandlerAttributes() method on the FluentMapper class.
@mikependon mikependon added deployed Feature or bug is deployed at the current release fixed The bug, issue, incident has been fixed. labels Sep 23, 2021
@mikependon
Copy link
Owner Author

This is now available on version RepoDB v1.12.8.

@mikependon mikependon unpinned this issue Sep 23, 2021
@xperiandri
Copy link
Contributor

xperiandri commented Jun 1, 2023

@mikependon what is the purpose of DataTypeNameAttribute as it is never used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed Feature or bug is deployed at the current release enhancement New feature or request fixed The bug, issue, incident has been fixed. priority Top priority feature or things to do todo Things to be done in the future
Projects
None yet
Development

No branches or pull requests

2 participants