What is object-relation mapping (ORM, O/RM, and O/R mapping)? Object-relational mapping in computer science is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a “virtual object database” that can be used from within the programming language.
source: Wikipedia
What is GORM? GORM is object-relation package for Go. It supports the following databases:
FoundationDB PostgreSQL MySQL SQLite Installation It is easy to install by invoking go get command:...
What’s an Embedded Resource? An embedded resource in a application is a file that is included as part of the application. The file is not compiled, but is accessable from the code at run-time. Embedded resources can be any file type.
Languages as JAVA and C# support resources out of box. However, this is not the case for Golang. In order to emebed resource, we need to develop our own solution....
In my previous blog post, we discussed one of my favourite code generation tools for Go. We found that they can be used to automate our trivial development tasks or even introduce features like generics and queries. Lets explore how to create our own tool.
Introduction The Go generate subcommand is a program that scans for special comments in your Go source code. The comment declares a command that should be executed....
Query langauges provide a set of features to querying, projecting and retrieving data (usually relational data). But how to introduces these standard, easily-learned patterns for querying data?
In this article we will explore Go LINQ packages that bridges the gap between the world of objects and the world of data.
LINQ For first time is introduced by Microsoft in their programming language C#. Its purpose is to bridge the gap between query languages such as SQL and programming languages....
In the article we will take the advantage of [generics] even that they are not first citizen in Go. We will explore gen and genny command line tools.
Gen Gen is a code generation tool that brings some generic query functions. It uses annotations to add this functionality to any structure. The generated code is part of your package and does not have any external dependencies. This approach avoids any reflection and produces an efficient concrete implementation for any annotated type....