groovy/grails에 대한 SQL 쿼리를 테스트하려고합니다. SQL 인서트가 작동하지 않는 이유는 무엇입니까? 나는 그 쿼리 라인을 인쇄하려고합니다. 놀랍지 만 그 작업조차도 아니므로 그루비에서 문자열 형식을 조사하고 있습니다. 누군가 그것에 대한 단서가 있다면 알려주십시오.groovy string formatting
println """INSERT INTO iu (version, path, uuid, name, description,
sourceversionfrom, sourceversionexto,
targetversionfrom, targetversionexto,
phase, directive, classname, methodname,
functionalarea_id, upgradepath_id, date_created,
last_updated, mark4delete, firstAvailable_id,
lastAvailable_id, uniqueid_id, elementcreateddate,
purpose, implementationdetails, userimpact)
VALUES (${this.version}, ${this.path}, ${this.uuid}, ${this.name},
${this.description}, ${this.sourceversionfrom},
${this.sourceversionexto}, ${this.targetversionfrom},
${this.targetversionexto}, ${this.phase}, ${this.directive},
${this.classname}, ${this.methodname}, $functionalarea_id,
$upgradepath_id, NOW(), NOW(), 0, ${this.projID},
${this.projID}, ${this.uniqueid_id},
${this.getElementCreatedDate()}, ${this.purpose},
${this.implementationDetails}, ${this.userImpact})"""
프로그램을 중단하고 그 라인
_ "프로그램이 멈추고"_? 그것은 추락합니까? 아무것도 출력하지 않고 멈 춥니 다. BTW : 게시 된 코드가 나에게 잘 어울립니다 ... –