Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120628 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 8368 invoked from network); 19 Jun 2023 21:17:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jun 2023 21:17:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8B7DB18050B for ; Mon, 19 Jun 2023 14:17:51 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 19 Jun 2023 14:17:51 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-4f86fbe5e4fso2077198e87.2 for ; Mon, 19 Jun 2023 14:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687209469; x=1689801469; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9wr3O0FnS2H8WyGlm9J7vknrkGxEJOihi75UgEFTfGQ=; b=Wm5BjY17rPpgynp4G5RNx5z5xC/XgdTDIOgITYrVuSH5EeyMfLRVXZEtwfw2zWpr2j QctMMfpkKEdQNIo2mNqVT7icdylL80ReIK2ofBPNuUsbAcWhLpZqvIbkzIcBm8RiGi4/ llKeSCbem/2Qd7nmnRnYgQJSZ9JS0TgtbM5pWfsM48NrLbntJzt1qXtMZAhTc3GiEIIm 6qY+xAh7gru/dP5ZsffIUuQFzr7jSdrcIUYn1Gz0BBPhabkpCrWv2xKQBGEqZTgEZshl 5d4TFF28ZHpw8odV/CLifxfi/GLEKHKUuUkymFy9A0afB2bjdOAPhe9M7RWMC3FvlcVX a5Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687209469; x=1689801469; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9wr3O0FnS2H8WyGlm9J7vknrkGxEJOihi75UgEFTfGQ=; b=JBPPbZ94UTJxxwpe0mm9pXYaVkG0qIxA6jm3sgbcx2WCTAODJ5TP0gmzg6rNziwRqP ALQXEk0XjIreQBq6KRDLPaQkj5sEQysxYv6Vmmd9tfx8sr6Q+P0K5xfMlxfi9JXcyJHu jC9OdNQchEEu8gT2qoNtZPuORysMoe9Ex1H6Pf4G3VtpOTDbeYokZNu+4B1D6rdclAwg 1e3EvAInXlplzC0E9DG8UXVHyhyEGs6q1cyRSd/ds0+JYnEZdz2cFASQAgHVb0Q5Q6g+ HtwSdkmWkEFouIlKTtb9MKbU29VAwOem+ZdT1PZuN3DFh9mn3IocPnk284XGu+ztbVW2 t6Yw== X-Gm-Message-State: AC+VfDztALzeKmEP1gy1LOzSj7pxu7Bgj+gw1eALidpmCIucqL7n7COJ 8F8d+5bXHslu+TFTKTw28T4sYkJ4rWDvQg6Ou7PP24kO X-Google-Smtp-Source: ACHHUZ5Kc4eeBljDtVL+Zc8mixZhVAGDeEO/Y3WdeTYrioajujTbld3UnCmtOHnktJvUudUwOV5VzsN4AA+mex+C6VI= X-Received: by 2002:a19:5e53:0:b0:4f8:6c1f:b1ab with SMTP id z19-20020a195e53000000b004f86c1fb1abmr2775613lfi.27.1687209468956; Mon, 19 Jun 2023 14:17:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6520:302:b0:23d:476c:2579 with HTTP; Mon, 19 Jun 2023 14:17:48 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Jun 2023 07:17:48 +1000 Message-ID: To: Vinicius Dias Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="0000000000000f15be05fe8211a7" Subject: Re: [PHP-DEV] Possible RFC: PDOStatement::addBatch From: mickmackusa@gmail.com (mickmackusa) --0000000000000f15be05fe8211a7 Content-Type: text/plain; charset="UTF-8" So if I'm not missing something, you want to add this new method to core to accommodate situations where: 1. the dev is too inexperienced to implement a pre-existing library and 2. the incoming 2d payload is not packaged as a csv file (and therefore cannot be directly imported as such) and 3. the application does not benefit from accessing the auto-incremented ids generated by each insert and 4. the performance of the bulk insertions resolves a crippling bottleneck in performance? IMO, the total footprint of your implemented snippet isn't significantly "sleeker/sexier" than using concatenation. I don't see anything ugly or unreadable about building two flat arrays, then using them to construct a SQL string and feed the execute() method. https://phpize.online/s/iW I am not an RFC voter, but I don't really see a compelling reason to add this method to the language. mickmackusa --0000000000000f15be05fe8211a7--