Skip to content

Commit

Permalink
Updated the BulkOperations README and the other documentations.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikependon committed Jun 6, 2020
1 parent b7e6e1f commit ef3838e
Show file tree
Hide file tree
Showing 4 changed files with 315 additions and 324 deletions.
64 changes: 32 additions & 32 deletions RepoDb.Docs/Coding Standards.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
## Coding Standards

Below are some of the things the developer needs to *consider* when doing a code change on the project. Some of the written standard on this page is a *preference* of the author itself.
Below are some of the things the developer needs to consider when doing a code change on the project. Some of the written standard on this page is a preference of the author itself.

> Please be noted that this coding standard is *not* a strict compliance for a developer to *push* a pull-requests to us. Your codes will thoroughly be evaluated, further collaborations may be done between the requestor and admin (if there are clarrifications before merging).
> Please be noted that this coding standard is not a strict compliance for a developer to push a pull-requests to us. Your codes will thoroughly be evaluated, further collaborations may be done between the requestor and admin (if there are clarrifications before merging).
### DEV Inputs
#### DEV Inputs

We are listening to any comments, therefore please do let us know if you think we need to *adjust* the way how we do the coding.
We are listening to any comments, therefore please do let us know if you think we need to adjust the way how we do the coding.

## Class Implementation

### ProperCase Class Naming Convention
#### ProperCase Class Naming Convention

Like this:

Expand All @@ -32,7 +32,7 @@ public class queryField

## Property Implementation

### Usage of *ProperCase* property naming convention
#### Usage of "ProperCase" property naming convention

Like this:

Expand All @@ -46,7 +46,7 @@ Not like this:
public IEnumerable<QueryField> queryFields { get; set; }
```

### Usage of the *get/set* for the property
#### Usage of the "get/set" for the property

Like this:

Expand All @@ -65,7 +65,7 @@ public string propertyName
}
```

### Direct assignment for *readonly* property
#### Direct assignment for "readonly" property

This is not the case always. However, please always consider the usage of direct assignment first (if feasible) before doing any other implementation approach.

Expand All @@ -75,7 +75,7 @@ public string ConnectionString => DbRepository.ConnectionString;

## Variables

### Usage of *var* keyword when declaring a method-level variables
#### Usage of "var" keyword when declaring a method-level variables

Like this:

Expand All @@ -89,7 +89,7 @@ Not like this:
QueryField field = new QueryField("Name", "Value");
```

### Usage of *camelCase* when declaring the method-level variables
#### Usage of "camelCase" when declaring the method-level variables

Like this:

Expand All @@ -104,7 +104,7 @@ var propertyindex = 0;
var ProperyIndex = 0;
```

### Declare a meaningful variable name
#### Declare a meaningful variable name

Like this:

Expand All @@ -118,7 +118,7 @@ Not like this:
var x = properties.Count();
```

### Usage of prefix *m_* for private variables
#### Usage of prefix "m_" for private variables

Like this:

Expand All @@ -134,7 +134,7 @@ private IDbConnection _activeConnection;

## Looping

### Always use *foreach* or *for (var)*
#### Always use "foreach" or "for (var)"

Please avoid using the Linq `ForEach()` method.

Expand All @@ -160,7 +160,7 @@ queryFields.ForEach(queryField =>

## Coding Styles

### Always open and close the conditional statements with curly-brackets
#### Always open and close the conditional statements with curly-brackets

Like this:

Expand All @@ -182,15 +182,15 @@ if (true) Process();

This must be done in all implementations.

### Always add an XML-comments in all public implementations
#### Always add an XML-comments in all public implementations

- *Methods*
- *Properties*
- *Classes*
- *Interfaces*
- *Enumerations*
- Methods
- Properties
- Classes
- Interfaces
- Enumerations

### Always use the *String.Concat()* over *+ Concatenation*
#### Always use the "String.Concat()" over "+ Concatenation"

Like this:

Expand All @@ -206,7 +206,7 @@ var tableName = "[dbo].[" + entityName + "]";

**Reason**: The author preferred the lowest level implementation as always for performance purposes.

### Always use the *String.Concat()* or *String.Format()* over the *String Interpolation*
#### Always use the "String.Concat()" or "String.Format()" over the "String Interpolation"

Like this:

Expand All @@ -222,7 +222,7 @@ var tableName = $"[dbo].[{entityName}]";

**Reason**: String interpolation is slow and is not efficient.

### Avoid the usage of *this* and *base* keywords, unless very necesarry
#### Avoid the usage of "this" and "base" keywords, unless very necesarry

Like this:

Expand All @@ -236,7 +236,7 @@ Not like this:
var entities = this.QueryAll<T>();
```

### Always use the *AsList()* over *ToList()*
#### Always use the "AsList()" over "ToList()"

Like this:

Expand All @@ -250,7 +250,7 @@ Not like this:
var childQueryFields = queryGroup.QueryFields.ToList();
```

### The shorter, the better
#### The shorter, the better

The methods must only contains few lines of codes. We prefer to have it maximum of 25 lines of codes per method.

Expand Down Expand Up @@ -293,7 +293,7 @@ internal static async Task<int> MergeAllAsyncInternalBase<TEntity>(this IDbConne

The regions are rich in RepoDb.

### Create a region for the *Properties*
#### Create a region for the "Properties"

Like this:

Expand All @@ -305,7 +305,7 @@ public string ConnectionString => DbRepository.ConnectionString;
#endregion
```

### Create a region for the *Static Properties*
#### Create a region for the "Static Properties"

Like this:

Expand All @@ -317,7 +317,7 @@ public static IDbConnection ActiveConnection { get; private set; }
#endregion
```

### Create a region for the *Private Variables*
#### Create a region for the "Private Variables"

Like this:

Expand All @@ -329,7 +329,7 @@ public int? m_hashCode = null;
#endregion
```

### Create a region for the *Static Private Variables*
#### Create a region for the "Static Private Variables"

Like this:

Expand All @@ -341,7 +341,7 @@ public static IDbConnection m_activeConnection = null;
#endregion
```

### Create a region for the *ConstructorsVariables*
#### Create a region for the "ConstructorsVariables"

Like this:

Expand All @@ -365,7 +365,7 @@ public QueryGroup(QueryGroup queryGroup) :
#endregion
```

### Create a region for the *Instance Methods*
#### Create a region for the "Instance Methods"

```csharp
#region Methods
Expand All @@ -378,7 +378,7 @@ public void Fix()
#endregion
```

### Create a region for the *Static Methods*
#### Create a region for the "Static Methods"

```csharp
#region Methods
Expand Down
38 changes: 19 additions & 19 deletions RepoDb.Docs/Reporting an Issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We considered the following issues.

A [bug](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Abug) is usually prioritized over the other (non-bug) items. If the requestor has enough reason to have the bug be fixed ASAP, the item will be put on top-priority. If the bug is a known-bug, or find not really important (depends on weight), then the bug will not be placed on top-priority list, but it will be picked once the other bugs are done.

> If the bug is top priority, the label [*priority*](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Apriority) will be set.
> If the bug is top priority, the label [priority](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Apriority) will be set.
**Usual Steps**

Expand All @@ -34,9 +34,9 @@ Please help us speed-up the fix.

**For-Grabs**

Depends on our internal assessment, we sometimes place the bug as an item for [*for-grabs*](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3A%22for+grabs%22) so the community can fix it for us.
Depends on our internal assessment, we sometimes place the bug as an item for [for-grabs](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3A%22for+grabs%22) so the community can fix it for us.

Below are some of the considerations for us to place a bug as a *for-grabs* item.
Below are some of the considerations for us to place a bug as a [for-grabs](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3A%22for+grabs%22) item.

- If somebody has voluteered to fix the bug.
- If we found the bug is not a breaking-change.
Expand All @@ -45,10 +45,10 @@ Below are some of the considerations for us to place a bug as a *for-grabs* item

We are not requiring a strict template. However, in order to minimize the round-trips of the communication, we would like to ask the issuer to make an effort on the following template.

- ***Title*** - is prefixed with *[Bug]:* or *[Error]:*.
- ***Description*** - must include the following.
- **Title** - is prefixed with **[Bug]:** or **[Error]:**.
- **Description** - must include the following.

- Name and version of the library (ie: *RepoDb v1.10.4* or *RepoDb.MySql v1.0.3*)
- Name and version of the library (i.e: **RepoDb v1.10.4** or **RepoDb.MySql v1.0.3**)
- Table Schema
- Class Implemention
- Call Stack Exception - a screenshot would suffice.
Expand All @@ -58,31 +58,31 @@ We are thanking you for this!

**Deploying**

Before deploying, if there are existing collaborations (ie: [*GitHub*](https://github.com/mikependon/RepoDb/issues) or [*Gitter*](https://gitter.im/RepoDb/community)), we will contact the issuer first. Otherwise, we will proceed with the deployment.
Before deploying, if there are existing collaborations (ie: [GitHub](https://github.com/mikependon/RepoDb/issues) or [Gitter](https://gitter.im/RepoDb/community)), we will contact the issuer first. Otherwise, we will proceed with the deployment.

After the deployment, we will leave the bug open for the next few days (not yet defined) and we will place a [*deployed*](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Adeployed) label. The label will be placed even the fix is deployed in a pre-release versions.
After the deployment, we will leave the bug open for the next few days (not yet defined) and we will place a [deployed](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Adeployed) label. The label will be placed even the fix is deployed in a pre-release versions.

### Request

A [request](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Arequest) is an any form of item the issuer would like us to implement (or do). Usually, it is being [assessed](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3A%22under+assessment%22) internally. The weight of the requests to be considered as top priority will be dependent on the community engagement or on our assessment. The higher the engagement ratio, the higher probability that the requests will be prioritized and implemented.

> There will be possibility that the requests will not be implemented if we find it not practical to do so. Sometimes, we placed it in the [*Nice-To-Have*](https://github.com/mikependon/RepoDb/blob/master/RepoDb.Docs/Reporting%20an%20Issue.md#nice-to-have) items.
> There will be possibility that the requests will not be implemented if we find it not practical to do so. Sometimes, we placed it in the [nice-to-have](https://github.com/mikependon/RepoDb/blob/master/RepoDb.Docs/Reporting%20an%20Issue.md#nice-to-have) items.
It is good to have a good description when requesting an items or features always. Please place a prefix *[Request];* on the title.
It is good to have a good description when requesting an items or features always. Please place a prefix **[Request]:** on the title.

We will place the *request* label always.
We will place the [request](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Arequest) label always.

### Question

A [question](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Aquestion) is a form of inquiry towards us. The item is open for everyone to answer, no need to wait for the [*for-grabs*](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3A%22for+grabs%22) label. We usually answer to the question ASAP.
A [question](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Aquestion) is a form of inquiry towards us. The item is open for everyone to answer, no need to wait for the [for-grabs](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3A%22for+grabs%22) label. We usually answer to the question ASAP.

A question is not a strict issue, so the issuer can contact us anytime in any forms of communication.

See below.

- [Gitter](https://gitter.im/RepoDb/community)
- [Email](https://repodb.readthedocs.io/en/latest/pages/contact.html)
- [Twitter](https://twitter.com/home) - notifying the [author](https://twitter.com/mike_pendon) or placing a tag *#RepoDb*.
- [Twitter](https://twitter.com/home) - notifying the [author](https://twitter.com/mike_pendon) or placing a tag **#RepoDb**.

### Nice-To-Have

Expand All @@ -92,29 +92,29 @@ A [nice-to-have](https://github.com/mikependon/RepoDb/labels/nice%20to%20have) i
We are not requiring a strict template for the nice-to-have items. However, we would like to ask the requestor to make an effort on the following template.

- ***Title*** - is prefixed with *[NiceToHave]:* or *[NTH]:*.
- ***Description*** - detailed explanation of the itention or things-to-be-done.
- **Title** - is prefixed with **[NiceToHave]:** or **[NTH]:**.
- **Description** - detailed explanation of the itention or things-to-be-done.

We are thanking you for this!

## Gitter and Twitter

Anyone can contact us via [Gitter](https://gitter.im/RepoDb/community) or [Twitter](https://twitter.com/home) anytime. Usually, the issue reported here is *Question*. However, depends on the outcome of the discussion, we will create an issue on our [*GitHub*](https://github.com/mikependon/RepoDb/issues) page and placing the right type-of-issue.
Anyone can contact us via [Gitter](https://gitter.im/RepoDb/community) or [Twitter](https://twitter.com/home) anytime. Usually, the issue reported here is [question](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Aquestion). However, depends on the outcome of the discussion, we will create an issue on our [GitHub](https://github.com/mikependon/RepoDb/issues) page and placing the right type-of-issue.

**We will do the following:**

- Consolidate all the information discussed.
- Create our own *Title* and *Description*.
- Create our own **Title** and **Description**.
- Issue a propery label.
- Tag the person whom we have collaborated with.

## StackOverflow

Any one can create a *Question* or *Bug* in [*StackOverflow*](https://stackoverflow.com/questions/tagged/repodb) by tagging RepoDb. We are visiting the site from time-to-time.
Any one can create a [question](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Aquestion) or [bug](https://github.com/mikependon/RepoDb/issues?q=is%3Aissue+is%3Aopen+label%3Abug) in [StackOverflow](https://stackoverflow.com/questions/tagged/repodb) by tagging **RepoDb**. We are visiting the site from time-to-time.

**What will we do if there is an issue in StackOverflow?**

- We will answer you directly in StackOverlow.
- We will not report the issue on our GitHub page.

> The questions or bugs issued at *StackOverflow* is not tracked from our history. We recommend that you file an issue directly to our [*GitHub*](https://github.com/mikependon/RepoDb/issues) page.
> The questions or bugs issued at [StackOverflow](https://stackoverflow.com/questions/tagged/repodb) is not tracked from our history. We recommend that you file an issue directly to our [GitHub](https://github.com/mikependon/RepoDb/issues) page.
Loading

0 comments on commit ef3838e

Please sign in to comment.