Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100813 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54544 invoked from network); 3 Oct 2017 13:59:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2017 13:59:07 -0000 Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.192.173 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.192.173 mail-pf0-f173.google.com Received: from [209.85.192.173] ([209.85.192.173:54641] helo=mail-pf0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/D0-34435-8A793D95 for ; Tue, 03 Oct 2017 09:59:07 -0400 Received: by mail-pf0-f173.google.com with SMTP id d187so4603806pfg.11 for ; Tue, 03 Oct 2017 06:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=g3/MbWXgBGLIhH+oYhM2zWOkNTnN+Od4k5yxGscN8LE=; b=TqtUvErx7UwJ+xnsuTUmX2NB2AMkMXzyQv3a1goz29TXiwy+Dk87BuSsqm5pdD3iyK KTjx6njUx8YKxx+WK0H69XTKO7RQsOcQPBPCZ8w/YndUHEms0f+YsYnRTlwkTDQk7Tvw OsXJP2J1PtOSy2NmeyfSL3ynO03jPUU86QOEjHutAsw+0d4Up7E7CxgGZs32KhW4EFy1 CLUVVQJqPoqZed58pCpui03iWjXy7gFlKYjNUNXCQrgxWIjHhuf6e6/mWMM0xty63HOi KXVtIRZjtQDFTvczcK/75hxcX1KjQFSKJg0YVnwUmrS85MqqaawSTUP7fUtiSCnIuvOO trZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=g3/MbWXgBGLIhH+oYhM2zWOkNTnN+Od4k5yxGscN8LE=; b=kwckQ/vTNubmDJlp4hCOokYNeYazHf81zuKWfSbWQKyJet8rfJJcW+NtMlxgFaWFn4 gjCU5D8k+5ikLRv9rPgCbJ+l6QOZr7F5/rcas79uMkwspv4SlzdiT0ELi3e4CLpdLUcy tPMyRUX1NWu+h0gagj8GUcJ8QlVojbB05udQKAJOhqa+i47svQ6mCXFZNDu9kVDuNeXq yto1u6vQvw26wAxwy9P8rkVlzwHT25aIb0XI9Upevp4Ga6mE++GHzXPPKX2DMG96yqN8 6o36GuBSOLzqU4AaBMcTif09KiFDJEec9jbAgGe6kd3CbCSqJ/7MTqCcRfNwPHmUWnDa AFCg== X-Gm-Message-State: AHPjjUjCEYyN4EMI5w6N0CDKurwxKCqAbKwb8euE7ctwgYQ4BM65goJx A0ycRdt2gTExSBU78uL3x+ExZHDDWqAvCdPnFL4BorSMrok= X-Google-Smtp-Source: AOwi7QAZcR3np3/tTBuekqiBuM6PDOl+dKoPL2cZYcKlAtFdlBgoMQDYSdvUvnOZL7xnKAnMgIBIjSgMWRjR8vISnvo= X-Received: by 10.84.131.36 with SMTP id 33mr17520723pld.100.1507039142138; Tue, 03 Oct 2017 06:59:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.151.165 with HTTP; Tue, 3 Oct 2017 06:59:01 -0700 (PDT) X-Originating-IP: [81.143.203.71] In-Reply-To: <209262d743236c86c8d66972922fba13@bohwaz.net> References: <25903b1e0fc5a726e44b1e3a5ab4aec4@bohwaz.net> <0607d622-caa9-ae1d-33db-1958a0ff0500@gmx.de> <20171001185540.5e572e58@platypus> <209262d743236c86c8d66972922fba13@bohwaz.net> Date: Tue, 3 Oct 2017 14:59:01 +0100 Message-ID: To: "BohwaZ/PHP" Cc: "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Re: [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO From: danack@basereality.com (Dan Ackroyd) On 2 October 2017 at 22:48, BohwaZ/PHP wrote: > > If you follow your logic, then PDO::sqliteCreateFunction shouldn't exist, > and this would make the PDO sqlite driver pretty much useless as SQLite is > missing a number of important functions. That's taking it to the illogical conclusion. Taking it to a better solution is that the method sqliteCreateFunction shouldn't exist on the PDO class, but instead on a PDOSqlite that extends PDO. class PDOSqlite extends PDO { public function createFunction(...) {...} } class PDO { public static function connect(string $dsn [, string $username [, string $password [, array $options ]]]) { // if connecting to SQLite DB { return new PDOSqlite(...); } } } This might be a mistake in how it was implemented originally. Looking back it seems that it was implemented before we had the RFC process....and is exactly the type of 'sub-optimal' implementation the RFC process is meant to prevent. > This is why I am pushing for PDO to be feature-full, so that you have the > choice to use PDO and not have to implement your own abstraction layer just > because you need one specific feature in one single case :) > That's a great aim! But rather thank just hack in new features building on sub-optimal ways of doing things, I think it would be better to create a plan to clean up the way that connection specific methods are available, with something along the lines of that which I mentioned above. cheers Dan Ack