I am mostly active on LinkedIn as kdabir
You can find me on Twitter (x) as @kdabir
Here is my humble Website
A simple ORM for databases and CSV files. Intended to be used in groovy scripts and small projects
License: MIT License
The default size is not good enough to accommodate all lengths of String.
Will be awesome if you can annotate a model class, and gstorm do all job:
@GstormTable
class Person {
String name, project
}
So, no need of:
def g = new Gstorm()
g.stormify(Person)
In existing tables, where ID field can have different name, add capability to configure name of the field (and perhaps the type)
Try compile time meta-programming instead of runtime meta-programming. Key benefit includes IDE support and compilation failures instead of runtime failures.
this way user of library can control logging in a standard way
It would be nice to have capability to be able to create indexed fields for better performance.
class Person { @Indexed String name }
Either github-pages (maybe using jekyll, or homegrown solution) or Wiki. Only considering markdown as the format in which docs will be written.
It would be great to have doc as part of main source repository, so not github considering wiki for now.
With jekyll md files can be converted to html by github, but need lot of steup and jekyll is more blog oriented than user manual.
Homegrown solution, generated html will also needed to be checked in to gh-pages
.
So that csv files can be directly opened with gstorm and sql queries can be performed.
Can considering adding SQLite DB as it is very commonly used file based db.
Currently one test is failing on jre11, possibly because of a Groovy Bug : https://issues.apache.org/jira/browse/GROOVY-8871
gstorm.GstormDataTypesTest > initializationError FAILED
java.lang.IllegalAccessError at GstormDataTypesTest.groovy:-1
73 tests completed, 1 failed
Try to update to groovy 2.5.4 once released to see if that fixes the issue.
Currently on intialization of gstorm, a create table query is executed with not exists clause (CREATE TABLE IF NOT EXISTS...
). It's better to give user an option to exclude creation of table.
In groovy scripts, in grape jcenter is included by default, so user won't have to include a custom repo. in Gradle build, jcenter() repo is also easily configurable.
This would need a change in groupId, something like io.github.kdabir.gstorm
.
I would expect the where
method to return a collection of the Item
class, but it returns a collection of GroovyRowResult
, which kind of cancels the purpose of ORM
After upgrading groovy version, running tests gives this error occurs :
Execution failed for task ':compileTestGroovy'.
> Bad <init> method call from inside of a branch
Exception Details:
Location:
gstorm/Gstorm.<init>(Ljava/sql/Connection;)V @91: invokespecial
Reason:
Error exists in the bytecode
Bytecode:
0x0000000: b800 1a4d 04bd 0004 5903 2c12 5632 122b
0x0000010: 2bb9 0059 0300 5359 10ff 1202 b800 292a
0x0000020: 5fab 0000 0000 0071 0000 0004 8065 35b8
0x0000030: 0000 002b aad3 b1ff 0000 0040 e83e bc00
0x0000040: 0000 0053 0000 9b75 0000 0068 5f5a 5903
0x0000050: 3212 2bb8 002f c000 2b5f 57b7 0032 a700
0x0000060: 3e5f 5a59 0332 b800 38c0 003a 5f57 b700
0x0000070: 3da7 002b 5f5a 5903 3212 3fb8 002f c000
0x0000080: 3f5f 57b7 0042 a700 165f 5a57 b700 44a7
0x0000090: 000d bb00 4659 1248 b700 49bf 57b1
Stackmap Table:
full_frame(@76,{UninitializedThis,Object[#63],Object[#77]},{Object[#79],UninitializedThis})
full_frame(@97,{UninitializedThis,Object[#63],Object[#77]},{Object[#79],UninitializedThis})
full_frame(@116,{UninitializedThis,Object[#63],Object[#77]},{Object[#79],UninitializedThis})
full_frame(@137,{UninitializedThis,Object[#63],Object[#77]},{Object[#79],UninitializedThis})
full_frame(@146,{UninitializedThis,Object[#63],Object[#77]},{Object[#79],UninitializedThis})
full_frame(@156,{Object[#2],Object[#63],Object[#77]},{Object[#79]})
Happens with groovy 2.3.4+ on JDK 1.8 u11/20. Works on Groovy 2.3.2. So can not bump groovy until this is fixed. Found related issues in both groovy and JDK:
like Double and Float.
There is lot of boilerplate code that goes in the beginning of the script to gstormify a model class. Few step to reduce can be to add constructors that automatically use in memory / file db / connection etc.
Also can include hsqldb with gstorm to addition grab is gone. Just be careful with (systemClassLoader = true)
stuff.
a static
method ModelClass.count()
that returns the count of rows in table would be a useful addition.
Remove file based versioning. Can use https://github.com/allegro/axion-release-plugin
Upgrade versions of dependencies to latest
Will be awesome if new Gstorm() can detect if a file with database connetion properties in the classpath and use it. For example gstorm.properties with something like:
database=myDatabase
user=myUser
password=myPassword
....
Hi, is there any way to stormify an object but not create a new table? Would be helpful with legacy databases.
We need to try this out, so that different groovy version is not downloaded because of transitive dependencies. Gstorm is not used in Java projects, so it is assumed some version of groovy is already available in the project / script in which gstorm is included.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.