Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130550 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id B516C1A00BC for ; Fri, 3 Apr 2026 16:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1775233225; bh=2b+e+7JqWd+gUaw6pYt4gt+oYri7AFItmU0/b/f98fY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DeubgnwKT+XnSOdG40p4zpKaPRZa4Qhxy6vufOhkggUgHSZj9j3k2HrQ4hRijAlUI jKaKdIPLwr8x/tGGrhsXgACp+CQPWn96NqzO0QC9npHKnE/wrfEINmR1GxwTHhFQnc 9TKo5Y1SeN/YCCShNd55KopsJpyI1NFKqpBS+MlCz1LDOq2MSQwHxIVU/kNbKbKZ0P bM4FgaNmdXi2XE4CfRELaTErZrJejpyzxbgTJSPrfdJVKTWudWQH1ILKs7n0Vr5sf+ ZUo4iywk3vRBkj0bqbdIV8TvlhdBK+VEyJrZ6QH+gH0DbK1jEXtkwRM6NQmtQ85Gn9 BPZ8xcxiuQrkg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B23AD1801DD for ; Fri, 3 Apr 2026 16:20:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 3 Apr 2026 16:20:24 +0000 (UTC) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-48334ee0aeaso19230245e9.1 for ; Fri, 03 Apr 2026 09:20:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775233218; cv=none; d=google.com; s=arc-20240605; b=KsuurI/HsOIAzIkv3wOFAIGP17lfOzDe5YaAP4R5DbgHyYtH0ugyMoHOmTUHX+nQ3t wXNXMwD0Gwb+uSLGTY7XQG18dhDLlx5z5HCr3BiICmkEB+Yz6VUF1t6AyX6fyMbFSJWv xSoPbOluF6Q92LEKF/1tuM1oK3j9Xfsn85TqhqFjvg8p18mfI7sJmVf22mzDn2qTuJ77 eKN2tnQnbyeNUK3NY0EGM5iRsha/Or8u314CnoBjO9gsC7SOBBeHQKz9PJugMahJYm0z w7m23PiFTA0NWFFIQhvHUe9YwOC94G4z4LRT1rARsR3zgQ29XoVbFWTyAe3GeQ2/e92P bs+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=p6D3NG81LkPNA/bYRmHcDiQ5MnK4nAm+/IqpXjA+TNA=; fh=bUewh9drWHpqWHAyWyEi5OmmOL9oHJ2XYj+D6skrHLg=; b=iSyYdMbbEFJhnphSvuHQoH0ByphCUGSDKixnI8ggxH/iKvjBOjw8N+7Xw2RS9Q751T HuwWu66snHJkJLoZkgFXkmC8jccz3iv6mmLwvvimfeNkY+dodpPofsgSlFSmKU3ErCHQ /cj8Qju1hZRHcegbsvHTrHCk+EjDJMCRmrWsldLTYVFYXQSHjy5UbOdo4JVFBIaHFiaD +TlNukXtu0ss5hmGoibiHDXaBEG/gMPPC0t7M1L20MZqz7w97IcY7Wu4g+cYqdilIhiO gJZ5wA6RKfvmjKCl/yZnC4OhcswKrsf9dzqSXNcNxG8mcr4uzbE7jheLiZonDxSCCoo/ O0LQ==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilia.ws; s=google; t=1775233218; x=1775838018; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=p6D3NG81LkPNA/bYRmHcDiQ5MnK4nAm+/IqpXjA+TNA=; b=GsVi0E2OGS0D9ba9fVGECGjRvPV484OcjRR96aMxihnXaBIR7CF+Yaxns82lW5SyLq E0lGhkM1AIo+r4sj6nDPxXjp5idVQgJLAKs5cdms7ERoHglS14cCa5T1iFGF2pjVf0Pf hIFouQsKyEMLANmTLJSAbpgAvEbjXnKxKBJsmsIZLtzcStkXQR3nrp828f564defX1ko DcJ+yqUl2YDfG4fbW7KWep/kKRyAvUargmDjlA3HyWgvyhRbD0PpHwezOtz5NZe9hobI YwJg7EnnNiWAfFmZyoNsBW/A7D+AjSsPqp9HnRCfgUbphHHgeB/w/UmbQOrodsob1H3t /nZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775233218; x=1775838018; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=p6D3NG81LkPNA/bYRmHcDiQ5MnK4nAm+/IqpXjA+TNA=; b=kBc2ykybTyM8ecYz2QpSJv0Mv+6lwg+QfEZyhz9RlaxKEmhzZkKyXiCVNBTkk8RBnS XjNhZYnStOIfB2ZwO1W2osWJQWTKMUlcIQ/CFHuu1RNeH4onqa9e2wZzsaJ6J9oAjbfB Fr4S8YIFsb+TIdNpJtKqPTRlTwRYt1A/faBTxJXMYjFgzxIuao6lWpsGgEp7lFck3yjH CzXLn0ETW7oatKbhnlVqlBdK6DUpVu0pkBmpYWaw0NrI/CodqA/KSBmtI/WnNQhPoKuX D2DyrNfPt9e1knKQmt3ZB7KkSdH8s5PS7wDBu9E9fAzgHCxOtHwATBrcVpCYzPnS1GFw Q0/w== X-Forwarded-Encrypted: i=1; AJvYcCV+RgEuHq0Nui4MZZgUBIj9D8dmJjAzv4QAeWO0kjTP+9s1YaeORa42NXLZClTJRXkjq/RSgKsSRGQ=@lists.php.net X-Gm-Message-State: AOJu0YwYKQ/uvDzrGTftS0CETpBjLi8GlAFUvHdrozVb4ltek/uvBAY/ A0MQF0/HAti9Nq8ZolsBXb9ybgafun5Ykb907Kpt8N5rbMFSlp0nUhtdf9qNUjY+tg0qQsc30Xl h4yQSSp5dmJSOAPdqhEpJNCFdFynntQPNfSG8odAM X-Gm-Gg: ATEYQzzrW7mwuH8Tf6IiMZQEG8P/IPcQVQUYnoww6KmobUIMT5yjhxciGWCxf6FLy+y TrEii54fbk4z/t1jotCQoRceGYapYReq6CaP8d2WPzL9/O+ZKDw1Iby4eoEsDx4s511i6NQcFll KLLYg0V8fwGjEGRvYlZOfV/S2htDSEdZt+vgbDFIq/+at/RLX9aMyq3rF3VE6i9XpgPvB69XVpj Nt51fsMNq6HEpT/DBwhMqW69Qqc/vLNqPJiKADJlVuhufnZ0fnTTgIIA1KZl7BEFAwO23hWa1w9 Rmsye4u7GKTR6XZ5SZIsMQB3IVgCJEWulbTy6VWKm0+n72E1Cjw12AM+bpjQMOwbU0EQ X-Received: by 2002:a05:600c:3549:b0:483:64b4:79da with SMTP id 5b1f17b1804b1-488997d5e84mr53005005e9.26.1775233218177; Fri, 03 Apr 2026 09:20:18 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <606EDE71-8E63-4626-A509-5E067DA3EACA@sakiot.com> In-Reply-To: Date: Fri, 3 Apr 2026 12:20:06 -0400 X-Gm-Features: AQROBzAFuSp4lBd5L8n3TNkCEmIwsx5o0shgC1TQC2j2u7Y1amd6tmhAnCD7ed0 Message-ID: Subject: Re: [PHP-DEV] PDO SQLite: statement attributes for SQL text retrieval To: Saki Takamachi Cc: Kamil Tekiela , internals@lists.php.net, saki@php.net Content-Type: multipart/alternative; boundary="0000000000005d11fe064e90b162" From: ilia@ilia.ws (Ilia) --0000000000005d11fe064e90b162 Content-Type: text/plain; charset="UTF-8" > > I don't feel strongly about one way or the other. I'm happy to revise this > into a function if the consensus is that everyone is more comfortable with > parameters allowing either pre/post binding state to be returned, probably > defaulting to the pre-binding state. > I don't think 2 methods are needed for functionality that is functionally > very similar. > > That being said, I still prefer an attribute because this isn't an > actionable function (like sqliteCreateFunction) but rather something that > retrieves information, which to me seems more appropriate for attribute > retrieval similar to Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE for example. > I don't think this warrants its own function and the value of setting a > return type seems minimal. > One more thing :) Looking at pdo/PgSQL and pdo/SQlite they both limit custom functions to things that change data. However, pdo/MySQL and pdo/Firebird break the convention, each has a single custom function for info retrieval, so there isn't technically as convention universally followed convention here. -- Ilia Alshanetsky Technologist, CTO, Entrepreneur E: ilia@ilia.ws T: @iliaa B: http://ilia.ws --0000000000005d11fe064e90b162 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't feel strongly about one way or the other. I'= m happy to revise this into a function if the consensus is that everyone is= more comfortable with parameters allowing either pre/post binding state to= be returned, probably defaulting to the pre-binding state.
I don= 't think 2 methods are needed for functionality that is functionally ve= ry similar.=C2=A0

That being said, I still prefer = an attribute because this isn't an actionable function (like sqliteCrea= teFunction) but rather something that retrieves information, which to me se= ems more appropriate for attribute retrieval similar to Pdo\Pgsql::ATTR_RES= ULT_MEMORY_SIZE for example.=C2=A0
I don't think this warrant= s its own function and the value of setting a return type seems minimal.

One more thing :)

Looking at pdo/PgSQL and pdo/SQlite they both limit custom = functions to things that change data. However, pdo/MySQL and pdo/Firebird b= reak the convention, each has a single custom function for info retrieval, = so there isn't technically=C2=A0as convention universally followed conv= ention here.
=C2=A0

--
Ilia Alshanetsky
Technologist, CTO, Entrepreneur
--0000000000005d11fe064e90b162--