@SqlUpdate @GetGeneratedKeys public Long addHistoryFromTransaction(@EntityHistoryBinder EntityHistoryModelDao<M, E> history, @SmartBindBean InternalCallContext context); }
@GetGeneratedKeys @SqlUpdate("update data_sources set name = :d.name," + " type = :d.type, datasource_type = :d.datasourceType," + " url = :d.url, ds_set_id = :d.dsSetId where id = :d.id") public abstract int update(@BindBean("d") DataSource ds);
@SqlUpdate("insert into queue_settings" + " (site_id, name, config, created_at, updated_at)" + " values (:siteId, :name, NULL, now(), now())") @GetGeneratedKeys int insertDefaultQueueSetting(@Bind("siteId") int siteId, @Bind("name") String name);
@SqlUpdate @GetGeneratedKeys public Long addHistoryFromTransaction(@EntityHistoryBinder EntityHistoryModelDao<M, E> history, @SmartBindBean InternalCallContext context); }
@SqlUpdate("insert into workflow_definitions" + " (revision_id, name, config_id)" + " values (:revId, :name, :configId)") @GetGeneratedKeys long insertWorkflowDefinition(@Bind("revId") int revId, @Bind("name") String name, @Bind("configId") int configId);
@SqlUpdate("INSERT INTO distributions (distribution_name, column_types, bucket_count)\n" + "VALUES (:distributionName, :columnTypes, :bucketCount)") @GetGeneratedKeys long insertDistribution( @Bind("distributionName") String distributionName, @Bind("columnTypes") String columnTypes, @Bind("bucketCount") int bucketCount);
@SqlUpdate("INSERT INTO distributions (distribution_name, column_types, bucket_count)\n" + "VALUES (:distributionName, :columnTypes, :bucketCount)") @GetGeneratedKeys long insertDistribution( @Bind("distributionName") String distributionName, @Bind("columnTypes") String columnTypes, @Bind("bucketCount") int bucketCount);
@SqlUpdate("insert into workflow_configs" + " (project_id, config, timezone, config_digest)" + " values (:projId, :config, :timezone, :configDigest)") @GetGeneratedKeys int insertWorkflowConfig(@Bind("projId") int projId, @Bind("config") String config, @Bind("timezone") String timezone, @Bind("configDigest") long configDigest);
@SqlUpdate("insert into queued_tasks" + " (site_id, queue_id, unique_name, data, created_at)" + " values (:siteId, :queueId, :uniqueName, :data, now())") @GetGeneratedKeys long insertQueuedTask(@Bind("siteId") Integer siteId, @Bind("queueId") Integer queueId, @Bind("uniqueName") String uniqueName, @Bind("data") byte[] data);
@SqlUpdate("insert into schedules" + " (project_id, workflow_definition_id, next_run_time, next_schedule_time, last_session_time, created_at, updated_at)" + " values (:projId, :workflowDefinitionId, :nextRunTime, :nextScheduleTime, NULL, now(), now())") @GetGeneratedKeys int insertSchedule(@Bind("projId") int projid, @Bind("workflowDefinitionId") long workflowDefinitionId, @Bind("nextRunTime") long nextRunTime, @Bind("nextScheduleTime") long nextScheduleTime); }
@SqlUpdate("insert into something (name) values (:it)") @GetGeneratedKeys public String generatedKeyReturnType(@Bind String name); }
@SqlUpdate("insert into session_monitors (attempt_id, next_run_time, type, config, created_at, updated_at)" + " values (:attemptId, :nextRunTime, :type, :config, now(), now())") @GetGeneratedKeys long insertSessionMonitor(@Bind("attemptId") long attemptId, @Bind("nextRunTime") long nextRunTime, @Bind("type") String type, @Bind("config") Config config);
@SqlBatch("insert into something (name) values (:it)") @GetGeneratedKeys public int[] insert(@Bind List<String> names);
@SqlUpdate("insert into tasks (attempt_id, parent_id, task_type, state, state_flags, updated_at)" + " values (:attemptId, :parentId, :taskType, :state, :stateFlags, now())") @GetGeneratedKeys long insertTask(@Bind("attemptId") long attemptId, @Bind("parentId") Long parentId, @Bind("taskType") int taskType, @Bind("state") short state, @Bind("stateFlags") int stateFlags);
@GetGeneratedKeys @SqlUpdate("insert into data_sources(name, type, url, ds_set_id, datasource_type) " + "values(:name, :type, :url, :ds_set_id, :datasource_type)") protected abstract int insert(@Bind("name") String name, @Bind("type") String type, @Bind("url") String url, @Bind("ds_set_id") long dsSetId, @Bind("datasource_type") String dataSourcetype);
@SqlUpdate("insert into tasks (attempt_id, parent_id, task_type, state, state_flags, updated_at)" + " values (:attemptId, :parentId, :taskType, :state, :stateFlags, :updatedAt)") @GetGeneratedKeys long insertResumedTask(@Bind("attemptId") long attemptId, @Bind("parentId") long parentId, @Bind("taskType") int taskType, @Bind("state") int state, @Bind("stateFlags") int stateFlags, @Bind("updatedAt") java.sql.Timestamp updatedAt);
@SqlUpdate("insert into revisions" + " (project_id, name, default_params, archive_type, archive_md5, archive_path, user_info, created_at)" + " values (:projId, :name, :defaultParams, :archiveType, :archiveMd5, :archivePath, :userInfo, now())") @GetGeneratedKeys int insertRevision(@Bind("projId") int projId, @Bind("name") String name, @Bind("defaultParams") Config defaultParams, @Bind("archiveType") String archiveType, @Bind("archiveMd5") byte[] archiveMd5, @Bind("archivePath") String archivePath, @Bind("userInfo") Config userInfo);
@SqlUpdate("insert into session_attempts (session_id, site_id, project_id, attempt_name, workflow_definition_id, state_flags, timezone, params, created_at, index)" + " values (:sessionId, :siteId, :projectId, :attemptName, :workflowDefinitionId, :stateFlags, :timezone, :params, now(), " + "(select coalesce(max(index), 0) + 1 from session_attempts where session_id = :sessionId)" + ")") @GetGeneratedKeys long insertAttempt(@Bind("siteId") int siteId, @Bind("projectId") int projectId, @Bind("sessionId") long sessionId, @Bind("attemptName") String attemptName, @Bind("workflowDefinitionId") Long workflowDefinitionId, @Bind("stateFlags") int stateFlags, @Bind("timezone") String timezone, @Bind("params") Config params);
@GetGeneratedKeys @SqlUpdate("insert into partitions(name, description, query, cost, destination_id, " + "schema_name, table_name, ds_set_id) values(:name, :description, :query, :cost, " + ":destination_id, :schema_name, :table_name, :ds_set_id)") int insert(@Bind("name") String name, @Bind("description") String description, @Bind("query") String query, @Bind("cost") long cost, @Bind("destination_id") long destinationId, @Bind("schema_name") String schemaName, @Bind("table_name") String tableName, @Bind("ds_set_id") long dsSetId);
@SqlUpdate("INSERT INTO shards (shard_uuid, table_id, bucket_number, create_time, row_count, compressed_size, uncompressed_size, xxhash64)\n" + "VALUES (:shardUuid, :tableId, :bucketNumber, CURRENT_TIMESTAMP, :rowCount, :compressedSize, :uncompressedSize, :xxhash64)") @GetGeneratedKeys long insertShard( @Bind("shardUuid") UUID shardUuid, @Bind("tableId") long tableId, @Bind("bucketNumber") Integer bucketNumber, @Bind("rowCount") long rowCount, @Bind("compressedSize") long compressedSize, @Bind("uncompressedSize") long uncompressedSize, @Bind("xxhash64") long xxhash64);