Skip to content

Update ToSqlVisitor.java#3

Merged
ajermakovics merged 1 commit intoajermakovics:masterfrom
CollinAlpert:patch-1
Jun 18, 2018
Merged

Update ToSqlVisitor.java#3
ajermakovics merged 1 commit intoajermakovics:masterfrom
CollinAlpert:patch-1

Conversation

@CollinAlpert
Copy link
Copy Markdown
Contributor

  • Add SQL string quotation for strings. Otherwise the SQL query is not valid.
  • Only make first letter of variable lowercase. private String firstName; will be called "firstName" on database, not "firstname".
  • Only replace method names that start with "get". Boolean getters have the same name as the private variable. For example the getter for private boolean isUnderAge; would be public boolean isUnderAge(); and not public boolean getIsUnderAge();.

- Add SQL string quotation for strings. Otherwise the SQL query is not valid.
- Only make first letter of variable lowercase. `private String firstName;` will be called "firstName" on database, not "firstname".
- Only replace method names that start with "get". Boolean getters have the same name as the private variable. For example the getter for `private boolean isUnderAge;` would be `public boolean isUnderAge();` and not `public boolean getIsUnderAge();`.
@ajermakovics ajermakovics merged commit fb46944 into ajermakovics:master Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants