Returns a {@code InsertAllRequest} object given the destination table and the rows to insert.
497726
public static InsertAllRequest of(TableId tableId, Iterable<RowToInsert> rows) {
    return newBuilder(tableId, rows).build();
  }
513448
public int insertObj(String tableName, String cols,String values,Object[] paramArray,int[] typeArray) {
		//JdbcTemplate jdbcTemplate = (JdbcTemplate) MicroDbHolder.getDbSource(dbName);
		//String tableName=changeTableNameCase(otableName);
		JdbcTemplate jdbcTemplate =getMicroJdbcTemplate();

		String timeName=getTimeName();
		if(autoOperTime){
			cols="create_time,update_time,"+cols;
			values=timeName+","+timeName+","+values;
		}
		String sql = "insert into " + tableName + " ("+cols+") values ("+values+")";
		logger.debug(sql);
		logger.debug(Arrays.toString(paramArray));
		Integer retStatus=jdbcTemplate.update(sql,paramArray,typeArray);
		return retStatus;
	}
718990
def insert(table, datas, avoid_conflict=False):
        
        if avoid_conflict:
            debut = """INSERT INTO {table} {ENTETE_INSERT} VALUES {BIND_INSERT} ON CONFLICT DO NOTHING"""
        else:
            debut = """INSERT INTO {table} {ENTETE_INSERT} VALUES {BIND_INSERT} RETURNING *"""
        l = [abstractRequetesSQL.formate(debut, table=table, INSERT=d, args=d) for d in datas if d]
        return Executant(l)
700045
function insertQuerySuccess(resultSet) {
        resultSet.Action = 'inserted';
        resultSet.ID = resultSet.rs.insertId;
        CRUD.stats.writesExecuted++;
        return resultSet;
    }
222320
public static Builder newBuilder(TableId table, RowToInsert... rows) {
    return newBuilder(table, ImmutableList.copyOf(rows));
  }
531723
@Override
	public <T extends DAO> T insert(DAO dao, boolean excludePrimaryKeys)  throws DatabaseException{
		ModelDef model = db.getModelMetaDataDefinition().getDefinition(dao.getModelName());
		if(excludePrimaryKeys){
			dao.add_IgnoreColumn( model.getPrimaryAttributes());
		}
		return insertRecord(dao, model, true);
	}
820285
@POST
    public final Response insert(@NotNull @Valid final MODEL model) throws Exception {
        return super.insert(model);
    }
239006
public static long insertOrThrow(Connection connection, String table,
			ContentValues values) {

		StringBuilder insert = new StringBuilder();
		insert.append("insert into ").append(CoreSQLUtils.quoteWrap(table))
				.append("(");

		Object[] args = null;
		int size = (values != null && values.size() > 0) ? values.size() : 0;

		args = new Object[size];
		int i = 0;
		for (String colName : values.keySet()) {
			insert.append((i > 0) ? "," : "");
			insert.append(CoreSQLUtils.quoteWrap(colName));
			args[i++] = values.get(colName);
		}
		insert.append(')');
		insert.append(" values (");
		for (i = 0; i < size; i++) {
			insert.append((i > 0) ? ",?" : "?");
		}
		insert.append(')');

		String sql = insert.toString();

		PreparedStatement statement = null;

		long id = 0;
		try {
			statement = connection.prepareStatement(sql);
			setArguments(statement, args);
			int count = statement.executeUpdate();

			if (count == 0) {
				throw new GeoPackageException(
						"Failed to execute SQL insert statement: " + sql
								+ ". No rows added from execution.");
			}

			try (ResultSet generatedKeys = statement.getGeneratedKeys()) {
				if (generatedKeys.next()) {
					id = generatedKeys.getLong(1);
				} else {
					throw new GeoPackageException(
							"Failed to execute SQL insert statement: " + sql
									+ ". No row id was found.");
				}
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to execute SQL insert statement: " + sql, e);
		} finally {
			closeStatement(statement, sql);
		}

		return id;
	}
993345
public AllDocsRequestBuilder getAllDocsRequestBuilder() {
        return new AllDocsRequestBuilderImpl(new ViewQueryParameters<String,
                AllDocsRequestResponse.AllDocsValue>(client, this, "", "", String.class,
                AllDocsRequestResponse.AllDocsValue.class) {
            protected DatabaseURIHelper getViewURIBuilder() {
                return new DatabaseURIHelper(db.getDBUri()).partition(partition).path("_all_docs");
            }
        });
    }
582629
@Override
	public List<RecordContext> getAllData () throws DatabaseException {
    	SqlPreparedStatementWrapper psGetAllData = null;
    	try {
        	psGetAllData = DbSQL.getSingleton().getPreparedStatement("context.ps.alldata");
			List<RecordContext> result = new ArrayList<>();
			try (ResultSet rs = psGetAllData.getPs().executeQuery()) {
				while (rs.next()) {
					result.add(new RecordContext(rs.getLong(DATAID), rs.getInt(CONTEXTID), rs.getInt(TYPE), rs.getString(DATA)));
				}
			}
			
			return result;
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psGetAllData);
		}
    }
109750
@NonNull
  public static InsertInto insertInto(@NonNull String table) {
    return insertInto(CqlIdentifier.fromCql(table));
  }
651015
protected void bufferInsertRow(String table, Object[][] row) throws IOException {
		StringBuffer sql = (StringBuffer)insertBuffers.get(table);
		if (sql != null) {
			if (traits.supportsMultiRowInsert() && (sql.length() < blockSize)) {
				sql.append(',');
				appendInsertValues(sql, row);
				return;
			} else {
				flushInsertBuffer(table);
			}
		}
		sql = new StringBuffer(blockSize);
		synchronized (sql) { //only for StringBuffer
			appendInsertStatement(sql, table, row);
			insertBuffers.put(table, sql);
		}
	}
64717
private Vector getAllTables() {

        Vector result = new Vector(20);

        try {
            if (cConn == null) {
                return null;
            }

            dbmeta = cConn.getMetaData();

            String[] tableTypes = { "TABLE" };
            ResultSet allTables = dbmeta.getTables(null, null, null,
                                                   tableTypes);

            while (allTables.next()) {
                String aktTable = allTables.getString("TABLE_NAME");
                ResultSet primKeys = dbmeta.getPrimaryKeys(null, null,
                    aktTable);

                // take only table with a primary key
                if (primKeys.next()) {
                    result.addElement(aktTable);
                }

                primKeys.close();
            }

            allTables.close();
        } catch (SQLException e) {

            // System.out.println("SQL Exception: " + e.getMessage());
        }

        return result;
    }
750818
public int insert(Entity record) throws SQLException {
		Connection conn = null;
		try {
			conn = this.getConnection();
			return runner.insert(conn, record);
		} catch (SQLException e) {
			throw e;
		} finally {
			this.closeConnection(conn);
		}
	}
981955
def create_insert():
    
    insert = upkey("insert").setResultsName("action")

    # VALUES
    attrs = Group(delimitedList(var)).setResultsName("attrs")
    value_group = Group(Suppress("(") + delimitedList(value) + Suppress(")"))
    values = Group(delimitedList(value_group)).setResultsName("list_values")
    values_insert = Suppress("(") + attrs + Suppress(")") + upkey("values") + values

    # KEYWORDS
    keyword = Group(var + Suppress("=") + value)
    item = Group(Suppress("(") + delimitedList(keyword) + Suppress(")"))
    keyword_insert = delimitedList(item).setResultsName("map_values")

    return insert + into + table + (values_insert | keyword_insert) + Optional(throttle)
849152
protected RemoteStatements updateNextValueQuery(NextValueRequest request) {
		return request.getKey().getMetadata().getType() == IdSourceType.TABLE
				? getTableQuery( request )
				: getSequenceIncrementQuery( request );
	}
401230
private static void addTable(Connection conn, PageContext pc, String name, Query query, boolean doSimpleTypes, ArrayList<String> usedTables)
	    throws SQLException, PageException {
	Statement stat;
	usedTables.add(name);
	stat = conn.createStatement();
	Key[] keys = CollectionUtil.keys(query);
	int[] types = query.getTypes();
	int[] innerTypes = toInnerTypes(types);
	// CREATE STATEMENT
	String comma = "";
	StringBuilder create = new StringBuilder("CREATE TABLE " + name + " (");
	StringBuilder insert = new StringBuilder("INSERT INTO  " + name + " (");
	StringBuilder values = new StringBuilder("VALUES (");
	for (int i = 0; i < keys.length; i++) {
	    String key = keys[i].getString();
	    String type = (doSimpleTypes) ? "VARCHAR_IGNORECASE" : toUsableType(types[i]);

	    create.append(comma + key);
	    create.append(" ");
	    create.append(type);
	    insert.append(comma + key);
	    values.append(comma + "?");
	    comma = ",";
	}
	create.append(")");
	insert.append(")");
	values.append(")");
	stat.execute(create.toString());
	PreparedStatement prepStat = conn.prepareStatement(insert.toString() + values.toString());

	// INSERT STATEMENT
	// HashMap integerTypes=getIntegerTypes(types);

	int count = query.getRecordcount();
	QueryColumn[] columns = new QueryColumn[keys.length];
	for (int i = 0; i < keys.length; i++) {
	    columns[i] = query.getColumn(keys[i]);
	}
	for (int y = 0; y < count; y++) {
	    for (int i = 0; i < keys.length; i++) {
		int type = innerTypes[i];
		Object value = columns[i].get(y + 1, null);

		// print.out("*** "+type+":"+Caster.toString(value));
		if (doSimpleTypes) {

		    prepStat.setObject(i + 1, Caster.toString(value));
		}
		else {
		    if (value == null) prepStat.setNull(i + 1, types[i]);
		    else if (type == BINARY) prepStat.setBytes(i + 1, Caster.toBinary(value));
		    else if (type == DATE) {
			// print.out(new java.util.Date(new
			// Date(DateCaster.toDateAdvanced(value,pc.getTimeZone()).getTime()).getTime()));

			prepStat.setTimestamp(i + 1, (value.equals("")) ? null : new Timestamp(DateCaster.toDateAdvanced(query.getAt(keys[i], y + 1), pc.getTimeZone()).getTime()));
			// prepStat.setObject(i+1,Caster.toDate(value,null));
			// prepStat.setDate(i+1,(value==null || value.equals(""))?null:new
			// Date(DateCaster.toDateAdvanced(value,pc.getTimeZone()).getTime()));
		    }
		    else if (type == TIME)
			prepStat.setTime(i + 1, (value.equals("")) ? null : new Time(DateCaster.toDateAdvanced(query.getAt(keys[i], y + 1), pc.getTimeZone()).getTime()));
		    else if (type == TIMESTAMP)
			prepStat.setTimestamp(i + 1, (value.equals("")) ? null : new Timestamp(DateCaster.toDateAdvanced(query.getAt(keys[i], y + 1), pc.getTimeZone()).getTime()));
		    else if (type == DOUBLE) prepStat.setDouble(i + 1, (value.equals("")) ? 0 : Caster.toDoubleValue(query.getAt(keys[i], y + 1)));
		    else if (type == INT) prepStat.setLong(i + 1, (value.equals("")) ? 0 : Caster.toLongValue(query.getAt(keys[i], y + 1)));
		    else if (type == STRING) prepStat.setObject(i + 1, Caster.toString(value));
		}

	    }
	    prepStat.execute();
	}

    }