Create a INSERT IGNORE INTO clause

@param entity table to insert to
@return insert clause
549780
public SQLInsertClause insertIgnore(RelationalPath<?> entity) {
        SQLInsertClause insert = insert(entity);
        insert.addFlag(Position.START_OVERRIDE, "insert ignore into ");
        return insert;
    }
1351971
public int[] insert(Connection conn, Entity... records) throws SQLException {
		checkConn(conn);
		if(ArrayUtil.isEmpty(records)){
			return new int[]{0};
		}
		
		//单条单独处理
		if(1 == records.length) {
			return new int[] { insert(conn, records[0])};
		}
		
		PreparedStatement ps = null;
		try {
			ps = dialect.psForInsertBatch(conn, records);
			return ps.executeBatch();
		} finally {
			DbUtil.close(ps);
		}
	}
672648
def _insert_or_replace_entity(entity):
    '''
    
    '''
    _validate_entity(entity)

    request = HTTPRequest()
    request.method = 'PUT'
    request.headers = [_DEFAULT_CONTENT_TYPE_HEADER,
                        _DEFAULT_ACCEPT_HEADER]
    request.body = _get_request_body(_convert_entity_to_json(entity))

    return request
668751
@CheckResult protected Observable<Long> insert(final String table, final ContentValues contentValues) {
    return Observable.defer(new Func0<Observable<Long>>() {
      @Override
      public Observable<Long> call() {
        return Observable.just(db.insert(table, contentValues));
      }
    });
  }
90901
public function insert($ignore = false)
    {
        $this->validate();

        // Optional ignore string
        if ($ignore) {
            $insertString = "INSERT IGNORE INTO `%s` (%s) VALUES %s";
        } else {
            $insertString = "INSERT INTO `%s` (%s) VALUES %s";
        }

        $query = sprintf(
            $insertString,
            $this->table,
            $this->rowsString,
            $this->bindString
        );

        try {
            $this->db->execute($query, $this->valuesFlattened);
            return $this->db->affectedRows() > 0;
        } catch (PDOException $ex) {
            Di::getDefault()->get(Services::LOGGER)->error(
                'Could not perform bulk insert ' . $ex->getMessage() . '    TRACE: ' . $ex->getTraceAsString()
            );
            throw new BatchInsertException($ex->getMessage());
        }
    }
446996
@Override
	public boolean insert(T entity) {
		if(entity == null) {
			return false;
		}
		
		X primaryID = getPrimaryID(entity);
		if(primaryID != null) {
			if(!allowEmptyOrZeroID() && AssertUtils.isEmpty(primaryID)) {
				return false;
			}
		}

		try {
		    this.mongoTemplate.insert(entity);
		} catch(RuntimeException e) {
		    // this ensures that any insert operation that fails returns a false
		    return false;
		}
		
		return true;
	}
76208
@Override
    public <T> Iterable<Key<T>> insert(final Iterable<T> entities) {
        return insert(entities, new InsertOptions()
                                    .writeConcern(defConcern));
    }
581272
private void generateInsert(M2MEntity entity, String packageName) {
		if (!isMethodAlreadyDefined(entity, "insert")) {
			// @formatter:off
			MethodSpec methodSpec = MethodSpec.methodBuilder("insert").addModifiers(Modifier.PUBLIC)
					.addModifiers(Modifier.ABSTRACT).addAnnotation(AnnotationSpec.builder(BindSqlInsert.class).build())
					.addParameter(ParameterSpec.builder(TypeUtility.className(packageName, entity.name), "bean")
							.addAnnotation(
									AnnotationSpec.builder(BindSqlParam.class).addMember("value", "$S", "bean").build())
							.build())
					.returns(Integer.TYPE).build();
			// @formatter:on
			classBuilder.addMethod(methodSpec);
		}
	}
672875
private String createInsertQuery() {
        StringBuilder query = new StringBuilder();
        query.append("insert into ").append(m_tableName)
                .append("(").append(m_propertyNames[0]);
        for (int i = 1; i < m_propertyNames.length; i++) {
            query.append(",").append(m_propertyNames[i]);
        }
        query.append(") values (?");
        for (int i = 1; i < m_propertyNames.length; i++) {
            query.append(",?");
        }
        query.append(")");
        return query.toString();
    }
1310166
public function insert($table, array $data, $ignore = false)
    {
        $this->queryBuilder->insert($table, $this->asData($data), $ignore);
        return $this;
    }
1304347
public int insert(Connection conn, Entity record) throws SQLException {
		checkConn(conn);
		if(CollectionUtil.isEmpty(record)){
			throw new SQLException("Empty entity provided!");
		}
		PreparedStatement ps = null;
		try {
			ps = dialect.psForInsert(conn, record);
			return ps.executeUpdate();
		} catch (SQLException e) {
			throw e;
		} finally {
			DbUtil.close(ps);
		}
	}
1361404
def _insert_entity(entity):
    '''
    
    '''
    _validate_entity(entity)

    request = HTTPRequest()
    request.method = 'POST'
    request.headers = [_DEFAULT_CONTENT_TYPE_HEADER,
                        _DEFAULT_PREFER_HEADER,
                        _DEFAULT_ACCEPT_HEADER]
    request.body = _get_request_body(_convert_entity_to_json(entity))

    return request
533406
public ApiResponse createEntity(Entity entity) {
        assertValidApplicationId();
        if (isEmpty(entity.getType())) {
            throw new IllegalArgumentException("Missing entity type");
        }
        ApiResponse response = apiRequest(HttpMethod.POST, null, entity,
                organizationId, applicationId, entity.getType());
        return response;
    }
790182
private function applyEntityToDatabase($entity, $update)
    {
        if (!$entity->isValid()) {
            // #@todo handle somehow, maybe throw exception?
            return false;
        }
        if ($update) {
            $command = 'REPLACE INTO';
        } else {
            $command = 'INSERT INTO';
        }
        $query =
            $command . ' `' . $this->tableName . '` (`' .
            $this->getFields("`, `") .
            '`) VALUES (:' .
            $this->getFields(", :") .
            ');';
        $statement = $this->database->prepare($query);
        $valueArray = $entity->getValueArray();
        foreach ($this->entityFields as $index => $paramName) {
            $statement->bindParam(':' . $paramName, $valueArray[$index]);
        }
        $isSuccessful = $statement->execute();
        // #@todo throw and exception if $stmt->errorInfo() has an error?
        // var_dump($statement->errorInfo());

        $this->lastInsertId = $this->database->lastInsertId();

        return $isSuccessful;
    }
320202
public Long insertForGeneratedKey(Connection conn, Entity record) throws SQLException {
		checkConn(conn);
		if(CollectionUtil.isEmpty(record)){
			throw new SQLException("Empty entity provided!");
		}
		
		PreparedStatement ps = null;
		try {
			ps = dialect.psForInsert(conn, record);
			ps.executeUpdate();
			return StatementUtil.getGeneratedKeyOfLong(ps);
		} catch (SQLException e) {
			throw e;
		} finally {
			DbUtil.close(ps);
		}
	}
92908
@Deprecated
    <T> long[] insert(T[] entities, boolean withTransaction) {
        return insert(this.getTableNameByEntity(entities[0]), entities, withTransaction);
    }
635343
public static String insertColumns(Class<?> entityClass, boolean skipId, boolean notNull, boolean notEmpty) {
        StringBuilder sql = new StringBuilder();
        sql.append("<trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\">");
        //获取全部列
        Set<EntityColumn> columnSet = EntityHelper.getColumns(entityClass);
        //当某个列有主键策略时，不需要考虑他的属性是否为空，因为如果为空，一定会根据主键策略给他生成一个值
        for (EntityColumn column : columnSet) {
            if (!column.isInsertable()) {
                continue;
            }
            if (skipId && column.isId()) {
                continue;
            }
            if (notNull) {
                sql.append(SqlHelper.getIfNotNull(column, column.getColumn() + ",", notEmpty));
            } else {
                sql.append(column.getColumn() + ",");
            }
        }
        sql.append("</trim>");
        return sql.toString();
    }