Inserts a table row with specified data.

        :param table: the expression of the table to insert data into, quoted or unquoted
        :param values: a dictionary containing column-value pairs
        :return: last inserted ID
518389
def insert(self, table, values):
        
        assert isinstance(values, dict)

        sb = self.sql_builder().insert(table)
        for column, value in values.iteritems():
            values[column] = sb.create_positional_parameter(value)
        return sb.values(values).execute()
803882
def insertData(self, tablename, list_value_pairs, list_SQLCMD_pairs=None):
		
		
		fields = self._getFieldsInDB(tablename)
		
		lst_field = []
		lst_value = []
		
		# normal field-value-pairs
		for pair in list_value_pairs:
			if pair[0] in fields:
				lst_field.append( pair[0] )
				lst_value.append( '"%s"' % pair[1] )
			else:
				print "err: field %s can't be found in the table" % pair[0]
				return False
			
		# field-SQL-command-pairs: the only difference is the missing double quotes in the SQL command
		if list_SQLCMD_pairs != None:
			for pair in list_SQLCMD_pairs:
				if pair[0] in fields:
					lst_field.append( pair[0] )
					lst_value.append( pair[1] )
				else:
					print "err: field %s can't be found in the table" % pair[0]
					return False
				
		# build the command
		SQL = 'INSERT INTO %s (%s) VALUES (%s)' % ( tablename, join(lst_field, ','), join(lst_value, ',') )
		self.execQuery( SQL )
		
		return True
345962
public static long insert(Connection connection, String table,
			ContentValues values) {
		try {
			return insertOrThrow(connection, table, values);
		} catch (Exception e) {
			log.log(Level.WARNING, "Error inserting into table: " + table
					+ ", Values: " + values, e);
			return -1;
		}
	}
397895
def ensure_table_strings(table):
    
    for row in range(len(table)):
        for column in range(len(table[row])):
            table[row][column] = str(table[row][column])
    return table
1330917
async def insert(**data):
    

    table = data.get('table')

    try:
        clickhouse_queries.insert_into_table(table, data)
        return 'Data was successfully inserted into table'

    except ServerException as e:
        exception_code = int(str(e)[5:8].strip())

        if exception_code == 60:
            return 'Table does not exists'
        elif exception_code == 50:
            return 'Invalid params'
427588
def insert_rows(self, row, no_rows=1):
        

        # Mark content as changed
        post_command_event(self.main_window, self.ContentChangedMsg)

        tab = self.grid.current_table

        self.code_array.insert(row, no_rows, axis=0, tab=tab)
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)
684207
def put(self, _name, **values):
        
        try:
            sql = self.sqles[_name]
            data = sql['data']
            if sql['positional']:
                d = [values[k] for k, v in sql['fields'].items()]
            else:
                d = {v:values[k] for k, v in sql['fields'].items()}
            data.append(d)
            if self.size and len(data) >= self.size:
                do_(sql['raw_sql'], args=data)
                sql['data'] = []
        except:
            if self.transcation:
                Rollback(self.engine)
            raise
658514
def compile_insert(self, query, values):
        
        # Essentially we will force every insert to be treated as a batch insert which
        # simply makes creating the SQL easier for us since we can utilize the same
        # basic routine regardless of an amount of records given to us to insert.
        table = self.wrap_table(query.from__)

        if not isinstance(values, list):
            values = [values]

        columns = self.columnize(values[0].keys())

        # We need to build a list of parameter place-holders of values that are bound
        # to the query. Each insert should have the exact same amount of parameter
        # bindings so we can just go off the first list of values in this array.
        parameters = self.parameterize(values[0].values())

        value = ['(%s)' % parameters] * len(values)

        parameters = ', '.join(value)

        return 'INSERT INTO %s (%s) VALUES %s' % (table, columns, parameters)
809984
def insert(self, rows):
        
        if len(rows) == 0:
            return

        sql, sql_args = self.get_insert_sql(rows)

        # get the cursor to execute the query
        cursor = self.get_cursor()

        # execute the query
        cursor.execute(sql, sql_args)
823478
def _Insert(cursor, table, values):
  
  precondition.AssertIterableType(values, dict)

  if not values:  # Nothing can be INSERTed with empty `values` list.
    return

  column_names = list(sorted(values[0]))
  for value_dict in values:
    if set(column_names) != set(value_dict):
      raise ValueError("Given value dictionaries must have identical keys. "
                       "Expecting columns {!r}, but got value {!r}".format(
                           column_names, value_dict))

  query = "INSERT IGNORE INTO %s {cols} VALUES {vals}" % table
  query = query.format(
      cols=mysql_utils.Columns(column_names),
      vals=mysql_utils.Placeholders(num=len(column_names), values=len(values)))

  values_list = []
  for values_dict in values:
    values_list.extend(values_dict[column] for column in column_names)

  cursor.execute(query, values_list)
388510
def Insert(self, key, value, row_index):
        
        if row_index < 0:
            row_index += len(self)

        if not 0 <= row_index < len(self):
            raise IndexError('Index "%s" is out of bounds.' % row_index)

        new_row = Row()
        for idx in self.header:
            if self.index(idx) == row_index:
                new_row[key] = value
            new_row[idx] = self[idx]
        self._keys = new_row.header
        self._values = new_row.values
        del new_row
        self._BuildIndex()
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)
72954
def append_column(table, col_name, default_value=None):
    '''
    
    '''
    table[0].append(col_name.strip())
    for row in table[1:]:
        row.append(default_value)
918338
def build_insert(self, table, values, columns=None):
        '''  '''
        if not columns:
            columns = table.columns
        if len(values) < len(columns):
            column_names = ','.join(columns[-len(values):])
        else:
            column_names = ','.join(columns)
        query = "INSERT INTO %s (%s) VALUES (%s) " % (table.name, column_names, ','.join(['?'] * len(values)))
        return query
118851
private static String generateCrudReplicatedInsert(Table table) {
        StringBuilder sb = new StringBuilder();
        sb.append("INSERT INTO " + table.getTypeName() + " VALUES ");

        generateCrudColumnList(table, sb);
        sb.append(";");

        return sb.toString();
    }
649801
def _insert_row(self, i, index):
        
        if i == len(self._index):
            self._add_row(index)
        else:
            self._index.insert(i, index)
            self._data.insert(i, None)