Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100780 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59989 invoked from network); 27 Sep 2017 09:04:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2017 09:04:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wm0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:46208] helo=mail-wm0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/32-34114-1A96BC95 for ; Wed, 27 Sep 2017 05:04:34 -0400 Received: by mail-wm0-f49.google.com with SMTP id m72so15758341wmc.1 for ; Wed, 27 Sep 2017 02:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UF+cuEeOp4TA83yk6jG7WtgSja1MJwA9k/a5S/hd1HI=; b=s3bNo2O2w4pD+mdCzaFLVPMN6NB7CSUHLMUpK2Q84FlSxYJuGGlRTgi9uFUQgdM/Ks w9u8ByDgEStifaP6EinuHM73g5ljYj689BvUEa+oom9jeQuHKpm2SCnb253qgmB+XzZ0 q86+2MfC61ar3PnrwlJGE0grkqKgqFUYWjBavzjK1IOmCtdTpRerFJDrEt5WKPa082Ex G1xBxHU0Zsb65nDdtz1DnNQ9E9ObtnM0BYBEp4u7stHBO1FqT5KQTeSr3hLSqKic5iVI m/M3VgnzwVewSJYO0+pf8mgf1RW2d2vNPeu3rGHYFTeZMwYsb+5kMLVF5auI4d8eEWgB TMfw== 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=UF+cuEeOp4TA83yk6jG7WtgSja1MJwA9k/a5S/hd1HI=; b=HFBjcf5VF7WzRw0hURnbKOSDbA5YVQmtBFvu/UgnDo/JduRAq1+s+LCb0ZtfUmwEOm tCnYH4C7pAI8lvnMzIm0wMD0TTTct0FyLLhg4HBPrUgcOnBqCvf3ZlJbFH1iR3QGQFAf 4hxnkMvEI+HLiFNZTl39x69sV4wjfpEw1kttNcnRpMf8sIZRd0bTsy9gLKBS31n7J8Wo XGDXu1A1beU9K04OilAKSdxL34qS5RETVR0VVZt8Dp1Sh6n2HPN/IVcIBeE0bzPXx053 VvQuSl8YkHNxZjylABWvSlsdYREXsh7Decgo7MHzbps/absVjBs5ikQf57w5T/S65gzU m7jA== X-Gm-Message-State: AHPjjUhVI0sw3xLI6JHHRgo3Y+Osayp8AQAKHiXdS6cD73rkmLW4Pq7k H1uHQZR26V+713SrPDUetE9+hdB/2Q7AW8CVsVUxskFO X-Google-Smtp-Source: AOwi7QDImlnYUfdWHw8HkC4i5TCEpSm4hq7bzegRDJ0PmRS+GGZaQeBvkSImkze4pT1L6Xv1c+7nImTpdn0UqiMuCmU= X-Received: by 10.28.48.20 with SMTP id w20mr858019wmw.23.1506503070377; Wed, 27 Sep 2017 02:04:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.164.6 with HTTP; Wed, 27 Sep 2017 02:04:09 -0700 (PDT) In-Reply-To: References: <25903b1e0fc5a726e44b1e3a5ab4aec4@bohwaz.net> Date: Wed, 27 Sep 2017 11:04:09 +0200 Message-ID: To: Lester Caine Cc: PHP Internals List Content-Type: multipart/alternative; boundary="001a114246b45cef0c055a2814dc" Subject: Re: [PHP-DEV] [RFC] [Discussion] Implement SQLite "openBlob" feature in PDO From: ocramius@gmail.com (Marco Pivetta) --001a114246b45cef0c055a2814dc Content-Type: text/plain; charset="UTF-8" On Wed, Sep 27, 2017 at 11:00 AM, Lester Caine wrote: > On 27/09/17 09:47, Dan Ackroyd wrote: > >> https://wiki.php.net/rfc/implement_sqlite_openblob_in_pdo > > > > Couple of questions: > > > >> $stream = $pdo->sqliteOpenBlob('test', 'data', 1); > > I tried reading the code but failed; what happens when this is called > > on a PDO connection that isn't to an SQLite database? Also, there > > should probably be tests around that behaviour. > > The bigger question is - Should database specific extensions to PDO be > allowed at all? The WHOLE base of PDO was that it would allow easy data > management between DIFFERENT databases. This should be implemented in a > way that mirrors blobs generically otherwise the generic database driver > should be used since a switch to another PDO driver will fail. This > should apply to any targeted extension to PDO, so anything that breaks > the generic base data needs tidying up. > First time I agree with Lester here, so please take note :-P Unless the type of the connection is PDOSQLiteConnection, this specific patch adds methods that are not interfaced, and need to be checked for existence every time. This is error-prone and just an annoyance that will likely need abstraction once it reaches "real world" (layers that isolate apps from PDO's inherent radioactivity). Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --001a114246b45cef0c055a2814dc--