congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SqlExecutor.insert
Code IndexAdd Tabnine to your IDE (free)

How to use
insert
method
in
org.hswebframework.ezorm.rdb.executor.SqlExecutor

Best Java code snippets using org.hswebframework.ezorm.rdb.executor.SqlExecutor.insert (Showing top 4 results out of 315)

origin: org.hswebframework/hsweb-easy-orm-rdb

default int insert(String sql, Object params) throws SQLException {
  return insert(new SimpleSQL(sql, params));
}
origin: hs-web/hsweb-easy-orm

default int insert(String sql, Object params) throws SQLException {
  return insert(new SimpleSQL(sql, params));
}
origin: org.hswebframework/hsweb-easy-orm-rdb

@Override
public int exec() throws SQLException {
  boolean supportBefore = !triggerSkip && table.getMeta().triggerIsSupport(Trigger.insert_before);
  boolean supportDone = !triggerSkip && table.getMeta().triggerIsSupport(Trigger.insert_done);
  Map<String, Object> context =null;
  if (supportBefore || supportDone) {
    context = table.getDatabase().getTriggerContextRoot();
    context.put("table", table);
    context.put("database", table.getDatabase());
    context.put("param", insertParam);
  }
  if (supportBefore) {
    table.getMeta().on(Trigger.insert_before, context);
  }
  SqlRender<InsertParam> render = table.getMeta().getDatabaseMetaData().getRenderer(SqlRender.TYPE.INSERT);
  SQL sql = render.render(table.getMeta(), insertParam);
  tryValidate(insertParam.getData(), Validator.Operation.INSERT);
  int total = sqlExecutor.insert(sql);
  if (supportDone) {
    context.put("total", total);
    table.getMeta().on(Trigger.insert_done, context);
  }
  return total;
}
origin: hs-web/hsweb-easy-orm

@Override
public int exec() throws SQLException {
  boolean supportBefore = !triggerSkip && table.getMeta().triggerIsSupport(Trigger.insert_before);
  boolean supportDone = !triggerSkip && table.getMeta().triggerIsSupport(Trigger.insert_done);
  Map<String, Object> context =null;
  if (supportBefore || supportDone) {
    context = table.getDatabase().getTriggerContextRoot();
    context.put("table", table);
    context.put("database", table.getDatabase());
    context.put("param", insertParam);
  }
  if (supportBefore) {
    table.getMeta().on(Trigger.insert_before, context);
  }
  SqlRender<InsertParam> render = table.getMeta().getDatabaseMetaData().getRenderer(SqlRender.TYPE.INSERT);
  SQL sql = render.render(table.getMeta(), insertParam);
  tryValidate(insertParam.getData(), Validator.Operation.INSERT);
  int total = sqlExecutor.insert(sql);
  if (supportDone) {
    context.put("total", total);
    table.getMeta().on(Trigger.insert_done, context);
  }
  return total;
}
org.hswebframework.ezorm.rdb.executorSqlExecutorinsert

Popular methods of SqlExecutor

  • list
  • delete
  • exec
  • tableExists
  • single
  • update

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • String (java.lang)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now