-
Notifications
You must be signed in to change notification settings - Fork 5
/
todo.txt
182 lines (107 loc) · 8.56 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
** NO
Add a ResultSet class with similar interface to java.sql.ResultSet
but it would be read-only and disconnected and would not throw any SQLException
Add method in Query class for it. executeSQL or executeQuery.
*************************************************************
Add Sybase DB2 Ingres ..... ?
NOPE https://github.com/JSQLParser/JSqlParser/releases/tag/jsqlparser-4.0
TODO https://stackoverflow.com/questions/44091688/using-zoneddatetime-with-datetimeoffset-in-sqlserver BETTER TO JUST DOCUMENT HOW TO USE UTC
TODO https://www.baeldung.com/java-daylight-savings
DONE https://www.testcontainers.org/ BUT we should set it up locally somewhere.
DONE SQL enum to Java enum? PostgreSQL, MySQL and H2. TODO Possible with MSSQL with CHECK constraints
DONE @NotTable classes should allow getters only, and we can set values through fields instead. (even normal table should allow this for read only columns)
DONE Add support for Records
TODO add dual compile for 9+ with module-info.java - somewhere there's a tutorial for that ADDED Automatic-Module-Name
DONE test for con.setAutoCommit(false) and commit at appropriate times. how does this affect connection pools
DONE see https://www.reddit.com/r/java/comments/lvya1x/persism_101_released_a_zero_ceremony_orm_for_java/gpghfn4/
TODO money types add map to int or long in cents (future javax.money) (USELESS)
DONE Merges Logger changes and make the classes package private - check the size of the jar after
DONE Fix countable https://github.com/sproket/Persism/issues/5
TODO https://stackoverflow.com/questions/1736630/sql-constraint-minvalue-maxvalue - might be nice....
ALTER TABLE [dbo].[Contacts] WITH CHECK ADD CHECK (([Status]>=(0) AND [Status]<=(10))) MSSSQL
DONE test overflowing all number types - should throw various runtime exceptions if they occur
TODO See about deprecating Column autoIncrement - I think all supported drivers detect this and even if you set it - why would it work? We won't get anything with getGeneratedKeys!
TODO Sample Oracle DB https://docs.oracle.com/cd/E11882_01/doc.112/e26211/loe.htm
DONE Session autocommit false? https://www.reddit.com/r/java/comments/lvya1x/persism_101_released_a_zero_ceremony_orm_for_java/gpghfn4/
DONE POM still gets log4j logback and slf4j - FFS
// DONE org.apache.logging.log4j s/b log4j2 - no support for log4j1 but test BRIDGE 1.x
// If existing components use Log4j 1.x and you want to have this logging routed to Log4j 2, then remove any log4j 1.x dependencies and add the following.
// http://logging.apache.org/log4j/2.x/maven-artifacts.html
TODO see if contributors want mentions in the pom.xml see https://github.com/jahlborn/jackcess/blob/master/pom.xml
TODO Can we use https://www.logicbig.com/tutorials/core-java-tutorial/java-9-changes/platform-logging.html to replace our logger? It doesn't seem so....
Maybe support https://github.com/ksuid/ksuid - not sure how or what we'd do.
TODO idea plugin - generate classes for Tables/Views (Views should be records) + code assist for property names with where() method
Could/should we support javax.persistence annotations? No. They don't make sense.
https://github.com/javaee/jpa-spec/tree/master/javax.persistence-api/src/main/java/javax/persistence
Maven code-coverage - see if we get this to work with AllTests (no container setting)
https://stackoverflow.com/questions/36199422/how-to-make-maven-unit-test-code-coverage-work
TODO FOLLOW UP Ucanaccess bug
https://sourceforge.net/p/ucanaccess/discussion/general/thread/52ae8bb570/
https://sourceforge.net/p/jackcess/bugs/155/
TODO check out https://readthedocs.org/
FIXED The incoming request has too many parameters. The server supports a maximum of 2100 parameters. SQL SERVER DOCUMENT THIS
This WAS a Persism Limitation on how I do joins. :)
DONE for 2.1 remove JTDS but ask on redddit and github
TODO Add handling for schema. When I have this I should include it in the SQL. select e.g. * from [dbo].[CustomerInvoice]
log4j vulnerability
DONE https://github.com/advisories/GHSA-jfh8-c2jp-5v3q
TODO See if we can return multiple ResultSets from one statement. Might perform a little better.
https://www.reddit.com/r/java/comments/re0hqn/persism_and_the_select_n1_problem/hocu4ji/?context=3
LOCAL DBS don't seem to return the multiple. Need to check each if they support and what separators to use
MSSSQL/PostgreSQL work with line feed and/or ";", Oracle NO, MySQL NO.
Perf testing
https://www.javaadvent.com/2021/12/keep-your-sql-in-check-with-flight-recorder-jmc-agent-and-jfrunit.html
https://www.reddit.com/r/java/comments/rhzaku/ide_plugins_for_performance_testing_code/
maybe add our own ConstructorProperties annotation to remove dependency on java.beans.
maybe support transient keyword (works like @NotColumn) - doesn't work with records.
Records need javax.persistence.Transient or java.beans.Transient annotation. PITA
(we should not have any dependency on javax - only java) OR Add our own Annotation.
------------
https://ebean.io/docs/query/sqlquery
String sql = "select c.id, c.name from customer c where c.name in (:names)";
List<SqlRow> rows = DB.sqlQuery(sql)
.setParameter("names", asList("Rob", "Fiona", "Jack"))
.findList();
------------------
https://michael-simons.github.io/neo4j-migrations/maintaining-a-medium-sized-java-library-in-2022-and-beyond/
https://www.willmcgugan.com/blog/tech/post/promoting-your-open-source-project-or-how-to-get-your-first-1k-github-stars/
What does a Persism POJO look like in JSON ? - looks fine.
todo post articles on linkedin
follow up on https://www.reddit.com/r/java/comments/tpqkix/persism_release_v210_with_support_for_table_joins/
todo document fluent POJO changes.
Quote from Jooq
https://www.reddit.com/r/java/comments/1hxgrc/jooqs_reason_for_being_compared_to_jpa_linq_jdbc/cb1hgnw/
// todo should we have a clear cache in MetaData so in dev when devs reload a web instance this metadata goes away?
https://stackoverflow.com/questions/42729444/how-can-i-populate-what-is-indexed-under-the-tags-metadata-field-in-maven-centra
https://stackoverflow.com/questions/16375204/how-can-i-add-meta-data-to-a-maven-pom
https://help.sonatype.com/repomanager3/nexus-repository-administration/tagging
https://s01.oss.sonatype.org/index.html#central-stat to get stats.
Try Persism with dropwizard web framework. https://www.dropwizard.io/en/stable/getting-started.html
todo What do to with read-only (getter only) in POJO (not records) with insert and update (it works but we should document better)
todo test out what happens if I make PersistableObject.originalvalue transient
todo add a join to table with spaces in the name and use OLD toString in TableInfo to see the error
todo how to test caseSensitive where clause values JoinInfo
PostgreSQL generating UUID https://stackoverflow.com/questions/12505158/generating-a-uuid-in-postgres-for-insert-statement
We use 9.1 which is the minimum for this. Should document all minimums.
SELECT uuid_in(md5(random()::text || random()::text)::cstring);
SELECT uuid_in(overlay(overlay(md5(random()::text || ':' || random()::text) placing '4' from 13) placing to_hex(floor(random()*(11-8+1) + 8)::int)::text from 17)::cstring);
SELECT * FROM pg_available_extensions;
todo https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-sequences/
https://stackoverflow.com/questions/46613214/java-9-maven-junit-does-test-code-need-module-info-java-of-its-own-and-wher
todo add a set of performance tests comparing Persism to the Entity framework
TODO PropertyInfo should have some extra info (maybe class it belongs to)
We should always call from PropertyInfo with extra information otherwise you just get ' argument type mismatch' which is not helpful to the end user.
for setter
todo IllegalArgumentException is a different type from the field type
todo IllegalAccessException or module related or setting on a final field in a record
todo InvocationTargetException the setter call where there's an exception in the setter method
todo for getter should we have a field get if there's no Getter?
DONE h2 back test with 1.x (worked)
Convertor what about varchar under UUID case??
todo CREATE USERS table for all DBs.
Changed synchronized to ReentrantLock
https://blog.fastthread.io/2023/02/28/pitfalls-to-avoid-when-switching-to-virtual-threads/
https://stackoverflow.com/questions/76390758/reentrantlock-to-replace-multiple-synchronized-methods
other places to post persism
https://lemmy.world/c/java
TODO TEST VALUE TYPES https://www.youtube.com/watch?v=a3VRwz4zbdw