Code Monkey home page Code Monkey logo

myhelper's Introduction

MyHelper

Help developers on the JetBrains platform to be more efficient and fast (mainly Java at present).

Features:

Convert Domain to SQL that create table

When using DDD for Java development, many Domain (including more fields) are generally created as needed first, when we focus on the repository layer, we often need to create SQL for domains and fields, which is painful because it takes double time.

If you want to complete this job more efficient, this plugin can help you.

"Copy Table SQL (ctrl shift C)" will appear in the right-click menu of editor and project View.

Minimize configuration,you just need to add the @table tag (tag value is not required) to your domain header comment, and it is recommended to configure @length tags for String Type Fields. MyHelper will infer all other relevant information intelligently.

Type conversion inference:

  • Java Type -> MySQL Type
  • String -> varchar, varchar(20) if @length tag is not specified
  • BigDecimal -> decimal, decimal(20, 4) if @length tag is not specified
  • int -> int
  • Integer -> int
  • long -> bigint
  • Long -> bigint
  • Boolean -> tinyint(1)
  • enum -> tinyint(2)
  • Date -> datetime
  • LocalDate -> date
  • LocalDateTime -> datetime

Tags:

  • @table [table_name]
  • @primaryKey [true] => Please configure @primaryKey tag when your primary key name is not called id.
  • @unique [true] => Create a unique index based on the name field
  • @index [true] => Will create an index based on the name field
  • @length 50 => default 20, This will become the length for name filed, means varchar(50)
  • @dbType varchar(100) => specify data type directly
  • @defaultVal 'tom' => Indicates that the default value is Tom
  • @nullAble [true] => Indicates that the name field can be null

Github | Demo

myhelper's People

Contributors

iisimpler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.