2017 © Pedro Peláez
 

library sql-string-generator

Write a DSL to generate valid SQL statements for SELECT, INSERT, UPDATE and DELETE

image

gonzalo123/sql-string-generator

Write a DSL to generate valid SQL statements for SELECT, INSERT, UPDATE and DELETE

  • Thursday, November 1, 2012
  • by gonzalo123
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Kata SQL String Generator., (*1)

http://www.solveet.com/exercises/SQL-String-Generator/139, (*2)

Given table metadata (name, columns/types, etc.), generate a well-formed SQL string. For example: String[] columns = { "a", "b" }; assertEquals("select a,b,c from x", sql.select(tableName, columns));, (*3)

Do this for the usual SQL queries: SELECT, INSERT, UPDATE, DELETE. To simplify the problem, consider only this data types: strings, integers and booleans., (*4)

Remember to only do one thing at a time, and try not to think of the solution "ahead of time". Let the methods and objects just grow by themselves, as you write more and more tests., (*5)

Don't forget: Try to use TDD to write code. Free Spanish book here. Write unit tests for generated code. Try to apply SOLID Principles., (*6)

The Versions

01/11 2012

dev-master

9999999-dev

Write a DSL to generate valid SQL statements for SELECT, INSERT, UPDATE and DELETE

  Sources   Download

GPL