GithubHelp home page GithubHelp logo

mazrean / genorm Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 1.0 463 KB

SQL Builder to prevent SQL mistakes using the Golang generics

Home Page: https://mazrean.github.io/genorm-docs/en/

License: MIT License

Go 100.00%
generics go golang hacktoberfest mysql orm sql

genorm's Introduction

genorm's People

Contributors

dependabot[bot] avatar mazrean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

isgasho

genorm's Issues

Transaction実装

Transaction対応したつもりだったが、sql.DBはstructなので対応できていなかった。
対応する。

PostgreSQL,SQLite対応

Prepared StatementのプレースホルダーがMySQL/MariaDBでは?なのが、$1$2$3…になるのに対応する必要がある。

Selectの結果bindのテスト

クエリの実行結果をstructにbindする部分のテストができていない。
バグが発生しやすい部分なので、しっかりテストしたい。

JoinedTable計算アルゴリズムの不備

現在のアルゴリズムだと

  • 1つのテーブルに2つのテーブルがJoinされる
  • 枝分かれの先にテーブルが2つ以上ある

の条件を満たしたテーブルがJoinedTableに出てこず、エラーになる。

ドキュメント整備

READMEだけだとどう考えても足りないので、ちゃんとドキュメントを整備する。

返り値が1つのSubQuery対応

返り値が1つだけのSubQueryに対応する。
返り値が複数の場合は、そもそも値の組みを扱う仕組みがないので一旦後回し。
SubQuery内では

  • SubQueryの結果を利用するクエリのテーブル
  • SubQueryの対象テーブル

両方のカラムを使用可能なため、それをうまく表現する必要がある。
とりあえずSubQueryの結果を利用するクエリのテーブルのみSubQueryの対象テーブルとして良い、みたいなのもありとは思う。

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.