Skip to content

feat: comment generation#3

Merged
guitarrapc merged 4 commits intomasterfrom
feat/comment
Aug 16, 2019
Merged

feat: comment generation#3
guitarrapc merged 4 commits intomasterfrom
feat/comment

Conversation

@guitarrapc
Copy link
Collaborator

TL;DR

Generate C# Comment from mysql query.

CREATE TABLE `Player` (
  `Id`  INT NOT NULL COMMENT 'Player Id',
  `Exp` INT NOT NULL,
  PRIMARY KEY (`Id`)
)
COMMENT='USER TABLE';
// auto generated by SqlToCsharp

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace MySQLToCsharpSampleConsoleApp
{
    /// <summary>
    /// USER TABLE
    /// </summary>
    public partial class Player
    {
        /// <summary>
        /// Player Id
        /// </summary>
        [Key]
        [Column(Order = 0)]
        public int Id { get; set; }
        public int Exp { get; set; }
    }
}

TODO

  • Column Comment detection
  • Table Comment detection
  • Unit Test
  • SQL to C# generator

Ref:

#2

@guitarrapc guitarrapc self-assigned this Aug 16, 2019
@guitarrapc guitarrapc added the enhancement New feature or request label Aug 16, 2019
@codecov
Copy link

codecov bot commented Aug 16, 2019

Codecov Report

Merging #3 into master will increase coverage by 0.08%.
The diff coverage is 61.53%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #3      +/-   ##
=========================================
+ Coverage   27.81%   27.9%   +0.08%     
=========================================
  Files          15      15              
  Lines       47009   47046      +37     
=========================================
+ Hits        13076   13126      +50     
+ Misses      33933   33920      -13
Impacted Files Coverage Δ
src/MySQLToCsharp/Generator.cs 0% <0%> (ø) ⬆️
src/MySQLToCsharp/Definitions.cs 98.17% <100%> (+0.01%) ⬆️
src/MySQLToCsharp/Extensions/StringExtensions.cs 100% <100%> (ø) ⬆️
...rp/Listeners/CreateTableStatementDetectListener.cs 96.66% <100%> (+0.46%) ⬆️
src/MySQLToCsharp/Parsers/MySql/MySqlParser.cs 16.72% <0%> (+0.06%) ⬆️
...LToCsharp/Parsers/MySql/MySqlParserBaseListener.cs 12.75% <0%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bf97c6...3f4c61f. Read the comment docs.

@guitarrapc guitarrapc merged commit d9b9a55 into master Aug 16, 2019
@guitarrapc guitarrapc deleted the feat/comment branch August 16, 2019 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant