-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fluent builder api #1004 #1014
Merged
Merged
Fluent builder api #1004 #1014
Changes from 55 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
7e2a670
https://github.com/JSQLParser/JSqlParser/issues/1004
gitmotte 8e71f9b
1004 add chaining - methods returning "this"
gitmotte aeb1502
#1004 add chaining - methods returning "this"
gitmotte 274ef21
Merge branch 'master.fluent' of https://github.com/gitmotte/JSqlParse…
gitmotte f38084c
a6ae42f
* add<Name> methods on collection-fields with varargs-parameter
gitmotte 88a5e4f
Merge branch 'master.fluent' of https://github.com/gitmotte/JSqlParse…
gitmotte f0b06e8
* add chaining - methods returning "this"
gitmotte 74a0eb6
* add public T get<Name>(Class<T>) - casting and returning the concrete
gitmotte 8a53418
* add public T get<Name>(Class<T>) - casting and returning the concrete
gitmotte 812b6ab
* overwrite chaining - methods of abstract parents/interfaces for
gitmotte 4b3a1a4
Merge branch 'master.fluent' of https://github.com/gitmotte/JSqlParse…
gitmotte 34db4f5
* add with prefix for fluent setters.
gitmotte a2600c7
add getters
gitmotte bb2b15f
* add with prefix for fluent setters. (revert to chaining setters, do
gitmotte 8b6fd6b
* add with prefix for fluent setters. (revert to chaining setters, do
gitmotte 0880fde
use new methods within testcases
gitmotte 63679e0
use new methods within testcases
gitmotte 1d0a24d
use new methods within testcases
gitmotte fda2f67
use new methods within testcases
gitmotte 8d2cde4
use new methods within testcases
gitmotte 1027829
use new methods within testcases
gitmotte 8de6c09
use new methods within testcases
gitmotte a0cc175
use new methods within testcases
gitmotte dd60c2e
Merge branch 'master.fluent' of
gitmotte ea4356a
remove create() methods - they do not add enough value to be justified
gitmotte 8ece698
* use new methods within testcases
gitmotte 77d92c0
* use new methods within testcases
gitmotte 0c99e8c
* use new methods within testcases
gitmotte 89fe5f4
* renamed constant
gitmotte 4d94a4d
use new methods within testcases
gitmotte d2cec9d
use new methods within testcases
gitmotte 0554831
use new methods within testcases
gitmotte b55b988
use new methods within testcases
gitmotte 8b68980
Merge branch 'master.fluent' of https://github.com/gitmotte/JSqlParse…
gitmotte 5f10ac4
* use new methods within testcases
gitmotte a7a0b70
* use new methods within testcases
gitmotte 77cf290
remove empty implicit constructor
gitmotte 09691fe
return the deparsed Statement - object
gitmotte d0c12d6
compare object tree
gitmotte 06684c1
compare object tree
gitmotte 2babbd7
* fix ObjectTreeToStringStyle
gitmotte c0dddbf
remove casts not needed
gitmotte cb2d078
* use new methods within testcases
gitmotte 48d859c
* use new methods within testcases
gitmotte 6267772
add empty constructors and override with-/add-methods returning concrete
gitmotte bfa2e20
* add ReflectionModelTest
gitmotte b80b2d5
* use new methods within testcases
gitmotte f1dfc4f
fix checkstyle errors
gitmotte e383883
license header
gitmotte bc8c2a4
Merge branch 'master.fluent' of https://github.com/gitmotte/JSqlParse…
gitmotte 41568fa
remove test-classes from ReflectionModelTest
gitmotte 94adc21
remove visitoradapter-classes from ReflectionModelTest
gitmotte 4fc8b27
Merge branch 'master' into master.fluent
gitmotte 8c5322e
Merge branch 'master.fluent' of https://github.com/gitmotte/JSqlParse…
gitmotte ce769d1
Merge branch 'master' into master.fluent
gitmotte 73b338b
Merge branch 'master.fluent' of https://github.com/gitmotte/JSqlParse…
gitmotte d8afd17
remove duplicate import declaration (checkstyle error)
gitmotte 4f2443c
* fix RandomUtils to support used java.sql.* types
gitmotte 9a9422f
add javadoc, stating that this is a marker interface
gitmotte db3b4ae
revert formatting change
gitmotte d77f3af
change to EXEC_TYPE.EXECUTE just so the assertion didn't change
gitmotte 324ccf1
try to revert format changes
gitmotte 0d434b8
try to revert format changes
gitmotte 9865783
remove brackets on @Override() -> @Override
gitmotte f7ec34e
Merge branch 'master' into master.fluent
gitmotte f3d113d
add with-methods to new fields
gitmotte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*- | ||
* #%L | ||
* JSQLParser library | ||
* %% | ||
* Copyright (C) 2004 - 2020 JSQLParser | ||
* %% | ||
* Dual licensed under GNU LGPL 2.1 or Apache License 2.0 | ||
* #L% | ||
*/ | ||
package net.sf.jsqlparser; | ||
|
||
public interface Model { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add a bit of doc that this is a marker interface for anything that is a certain type (in order to be able to make a limiting parameter that isn't Object). (Or something of that nature), just seeing a Model type with no methods might not explain our intent with what a
Model
is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should rename it to SqlModel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9a9422f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SqlModel would be a good name. That doc is good tho!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know if we need this kind of marker, but it's sometimes helpful to group things into a type hierarchy, which shares a common usage or programming style (with-/add methods, casting getters) to help others on implementation new model types
The first thought was to add a type variable to the model-type which represents the real model-type, but it makes the use complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, a marker works :)