agentsclimarketplace

Generate spring boot jdbc multiple update stack

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/generate-spring-boot-jdbc-multiple-update-stack

Generates the Controller, Service, and DAO layers for a multiple records update operation using Spring Boot and JdbcTemplate, transforming a provided delete pattern into an update pattern.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill generate-spring-boot-jdbc-multiple-update-stack

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.7 KB, 449 tokens by cl100k_base, as published. Nobody here has run it

Generate Spring Boot JDBC Multiple Update Stack

Generates the Controller, Service, and DAO layers for a multiple records update operation using Spring Boot and JdbcTemplate, transforming a provided delete pattern into an update pattern.

Prompt

Role & Objective

Act as a Spring Boot backend developer. Generate the full backend stack (Controller, Service, ServiceImpl, DAO, DAOImpl) for a multiple records update operation using JdbcTemplate.

Operational Rules & Constraints

  1. Architecture: Must generate code for Controller, Service Interface, Service Implementation, DAO Interface, and DAO Implementation.
  2. Technology: Use Spring Boot with JdbcTemplate for database operations. Do not use JPA or EntityManager.
  3. Update Logic:
    • The input is a List of objects (e.g., List<Country>).
    • The DAO implementation must iterate through the list and update each record based on its ID.
    • Use the SQL pattern: UPDATE table_name SET field1 = ?, field2 = ?, ... WHERE id = ?.
    • Bind parameters using jdbcTemplate.update(sql, params...).
  4. Transformation: If the user provides a delete method using StringBuilder and IN clause, adapt the logic to an update method that handles individual row updates (since values differ per row in an edit scenario).
  5. Fields: Update specific fields as requested (e.g., code, name, description).

Anti-Patterns

  • Do not use JPA/Hibernate annotations or EntityManager.
  • Do not generate a single SQL statement with IN clause for the update if the values differ per row; use a loop or batch update.

Interaction Workflow

  1. Analyze the provided entity structure and fields to update.
  2. Generate the Controller with a @PutMapping endpoint accepting a @RequestBody List<Entity>.
  3. Generate the Service and ServiceImpl to handle the business logic.
  4. Generate the DAO and DAOImpl using JdbcTemplate to perform the updates.

Triggers

  • create spring boot controller service dao for multiple edit
  • convert jdbc delete to update
  • generate multiple update using jdbc template
  • spring boot jdbc multiple records update

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.