From nobody Thu Jul 18 16:48:21 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPzJk0DSGz5Rjff; Thu, 18 Jul 2024 16:48:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPzJj6mGgz4S5m; Thu, 18 Jul 2024 16:48:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721321301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pSGmsBar9PkBd2sxI7fp8W2x2LPp2yjvJfhuyeLi9lg=; b=FZcg14nkAFtYsSAua20rtlP+SMsaVEHtWI+45U+yefmTVWUsjUiBC+ZI12a+gXYGdaVe6a qB+xODCP3ELH/kJdosXWwhxz6oxEBdbpOVO3gJb2FUYAqo9k+oVfxu2Fvs2t+9SFgthUd1 a67VCSuO20pGEW9fZkqXS+zUm4ZZZJextqCN+6rBMVg+ZtE20rPlHOaDCtyTx+YIDYqCqV k3fmLG/szjPxD+KXduJzmafUzHD9gHO4WX0USIRs+qLs8ZzRVlA6AmCbNQJoJpSDXDcQXB 3nzs8+KRj3DKxyL+06RRqmTBZM99vny/LqbT9wHEoRIaO63d1OihfHrfrAvK7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721321301; a=rsa-sha256; cv=none; b=ECowKpB/wtvrlcWYDDqnPjYzGkpj8tq9aI/G2NjabHkevGJDsOopGh7OIhL2Fc1dX+XLVd 7oC4AU3pfD8haHMgsA3mW9QM8/c2VSm1iBz1Mua3PPXBpw7MMlvkvxuE2Y1AjHqYc1VOBq ahGTk5vwqszbgY8qxdquEwWn1ITawQRdwHtt3Ql7weAUbVUpHt1tn8VN0Z5GiuvpzuZvlW tK1T/2b2h+azANF/t9mlT/r8HY0zj8cmL7WBixGUSW6JXo7Qxqmnt06+7R+u9hYfRnj5Pj MkjI5GR8mQiRrCI7JRIhr+sGGrhDWbAt/tASRGFEcHM8j9ADiT4FwTWDNPxhKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721321301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pSGmsBar9PkBd2sxI7fp8W2x2LPp2yjvJfhuyeLi9lg=; b=gDeIGF3zIsiusc5orYsOmb4zmuoTXL//9caLXXJK/T7pjCz/TO9s6sHItWGfe3XzvdttPP iy3uXTttKi0MMwYAD+N69labnGj6l1u1J8bdqltRKPzEG74klLs1Z4wPVbnaGDzN+moTM9 ZdJVuhgR5TVsuFLHxO1nVxo1EHKwGJQr+unP8Sw5Z0/a6XVbZJrrvYOQAEvoTjPoVqVBNv jYzAc4CjWUFB8wHF82ArRpwlP1rRS/pmZtE3LCRaJy72KdHgNIaRjnR77KRe8ClDG9Edlu W1elPO7SFliSPZlgg6TqNxI4ABzUUK0O/SUzdma/wNOnkaTnkJ0QEEyRBKo+cQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPzJj6B73zwT7; Thu, 18 Jul 2024 16:48:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IGmLKf009484; Thu, 18 Jul 2024 16:48:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IGmLL1009481; Thu, 18 Jul 2024 16:48:21 GMT (envelope-from git) Date: Thu, 18 Jul 2024 16:48:21 GMT Message-Id: <202407181648.46IGmLL1009481@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 7fc5c9713a63 - main - databases/p5-SQL-SplitStatement: Add p5-SQL-SplitStatement 1.00023 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7fc5c9713a63e0ab4da05ae240d1c2baebd73f96 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=7fc5c9713a63e0ab4da05ae240d1c2baebd73f96 commit 7fc5c9713a63e0ab4da05ae240d1c2baebd73f96 Author: Po-Chuan Hsieh AuthorDate: 2024-07-18 16:44:41 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-07-18 16:44:41 +0000 databases/p5-SQL-SplitStatement: Add p5-SQL-SplitStatement 1.00023 SQL::SplitStatement is a simple module which tries to split any SQL code, even including non-standard extensions, into the atomic statements it is composed of. The logic used to split the SQL code is more sophisticated than a raw split on the ; (semicolon) character: first, various different statement terminator tokens are recognized (see below for the list), then this module is able to correctly handle the presence of said tokens inside identifiers, values, comments, BEGIN ... END blocks (even nested), dollar-quoted strings, MySQL custom DELIMITERs, procedural code etc., as (partially) exemplified in the "SYNOPSIS" above. Consider however that this is by no means a validating parser (technically speaking, it's just a context-sensitive tokenizer). It should rather be seen as an in-progress heuristic approach, which will gradually improve as test cases will be reported. This also means that, except for the "LIMITATIONS" detailed below, there is no known (to the author) SQL code the most current release of this module can't correctly split. --- databases/Makefile | 1 + databases/p5-SQL-SplitStatement/Makefile | 27 +++++++++++++++++++++++++++ databases/p5-SQL-SplitStatement/distinfo | 3 +++ databases/p5-SQL-SplitStatement/pkg-descr | 17 +++++++++++++++++ databases/p5-SQL-SplitStatement/pkg-plist | 6 ++++++ 5 files changed, 54 insertions(+) diff --git a/databases/Makefile b/databases/Makefile index 14cbeddc4d2a..1e6dbfa87208 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -480,6 +480,7 @@ SUBDIR += p5-SQL-Maker SUBDIR += p5-SQL-NamedPlaceholder SUBDIR += p5-SQL-ReservedWords + SUBDIR += p5-SQL-SplitStatement SUBDIR += p5-SQL-Statement SUBDIR += p5-SQL-Translator SUBDIR += p5-SQLite-Work diff --git a/databases/p5-SQL-SplitStatement/Makefile b/databases/p5-SQL-SplitStatement/Makefile new file mode 100644 index 000000000000..86ad3f2a097f --- /dev/null +++ b/databases/p5-SQL-SplitStatement/Makefile @@ -0,0 +1,27 @@ +PORTNAME= SQL-SplitStatement +PORTVERSION= 1.00023 +CATEGORIES= databases perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Split any SQL code into atomic statements +WWW= https://metacpan.org/dist/SQL-SplitStatement + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${RUN_DEPENDS} +RUN_DEPENDS= p5-Class-Accessor>=0:devel/p5-Class-Accessor \ + p5-List-MoreUtils>=0:lang/p5-List-MoreUtils \ + p5-Regexp-Common>=0:textproc/p5-Regexp-Common +TEST_DEPENDS= p5-Test-Differences>=0.680:devel/p5-Test-Differences \ + p5-Test-Exception>=0.27:devel/p5-Test-Exception + +USES= perl5 +USE_PERL5= configure + +NO_ARCH= yes + +.include diff --git a/databases/p5-SQL-SplitStatement/distinfo b/databases/p5-SQL-SplitStatement/distinfo new file mode 100644 index 000000000000..3c5b96d40838 --- /dev/null +++ b/databases/p5-SQL-SplitStatement/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1721280200 +SHA256 (SQL-SplitStatement-1.00023.tar.gz) = 1a748420cd2ad341c2524ef1185b76ef7172969f17a9e4bab6f4376f0de9f35e +SIZE (SQL-SplitStatement-1.00023.tar.gz) = 63709 diff --git a/databases/p5-SQL-SplitStatement/pkg-descr b/databases/p5-SQL-SplitStatement/pkg-descr new file mode 100644 index 000000000000..bad86fbc8dff --- /dev/null +++ b/databases/p5-SQL-SplitStatement/pkg-descr @@ -0,0 +1,17 @@ +SQL::SplitStatement is a simple module which tries to split any SQL code, even +including non-standard extensions, into the atomic statements it is composed of. + +The logic used to split the SQL code is more sophisticated than a raw split on +the ; (semicolon) character: first, various different statement terminator +tokens are recognized (see below for the list), then this module is able to +correctly handle the presence of said tokens inside identifiers, values, +comments, BEGIN ... END blocks (even nested), dollar-quoted strings, MySQL +custom DELIMITERs, procedural code etc., as (partially) exemplified in the +"SYNOPSIS" above. + +Consider however that this is by no means a validating parser (technically +speaking, it's just a context-sensitive tokenizer). It should rather be seen as +an in-progress heuristic approach, which will gradually improve as test cases +will be reported. This also means that, except for the "LIMITATIONS" detailed +below, there is no known (to the author) SQL code the most current release of +this module can't correctly split. diff --git a/databases/p5-SQL-SplitStatement/pkg-plist b/databases/p5-SQL-SplitStatement/pkg-plist new file mode 100644 index 000000000000..c959247c43c3 --- /dev/null +++ b/databases/p5-SQL-SplitStatement/pkg-plist @@ -0,0 +1,6 @@ +bin/sql-split +%%SITE_PERL%%/SQL/SplitStatement.pm +%%SITE_PERL%%/SQL/SplitStatement/Tokenizer.pm +%%PERL5_MAN1%%/sql-split.1.gz +%%PERL5_MAN3%%/SQL::SplitStatement.3.gz +%%PERL5_MAN3%%/SQL::SplitStatement::Tokenizer.3.gz