Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Oracle PL / SQL ( .PSP and .SQL file extension) #9552

Open
core-ai-bot opened this issue Aug 30, 2021 · 3 comments
Open

[CLOSED] Oracle PL / SQL ( .PSP and .SQL file extension) #9552

core-ai-bot opened this issue Aug 30, 2021 · 3 comments

Comments

@core-ai-bot
Copy link
Member

Issue by smager
Thursday Apr 09, 2015 at 18:50 GMT
Originally opened as adobe/brackets#10863


Would it be possible if Brackets could have pl/sql as an extension?

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Thursday Apr 09, 2015 at 19:54 GMT


Tagging 'extension idea' so this will show up in lists of suggestions for extension authors. But I'll close this since this probably isn't something we'd add to the default download of Brackets -- the core of Brackets is focused primarily on front-end web technologies.

To give potential extension authors better guidance though, could you say more about exactly what features you'd want in a PL/SQL extension? You don't mean that Brackets should include an entire database engine built-in, right? Are you looking for the ability to connect to a database server and run commands, like a terminal? Or a visual database browser? Or features that help you write SQL query code -- if so, what sorts of features? Etc.

@core-ai-bot
Copy link
Member Author

Comment by smager
Friday Apr 10, 2015 at 17:42 GMT


my suggestion is to add pl/sql for #1. syntax highlighting and #2. run command for (batch files *.bat), a run command is used to compile source code, see TextPad by Helios Software Solutions.

PL/ SQL is not only for database but it is also for front-end web technologies. We use pl / sql for custom web application, pl / sql for web are similar to Classic ASP and PHP.

Please see the sample below for pl / sql or web procedure file (*.psp)

filename = ebb_groups_form.psp

<%@ plsql procedure="ebb_groups_form" %>
<%@ plsql parameter="p_module_id" type="NUMBER" default="NULL"%>
<%@ plsql parameter="p_group_id" type="VARCHAR2" default="NULL"%>
<%!
l_dhtmlx_path VARCHAR2(100) := zsi_lib.DHTMLXPath;
l_js_path VARCHAR2(100) := zsi_lib.JSPath;
l_style_path VARCHAR2(128) := zsi_lib.StylePath;
l_title VARCHAR2(50);
l_date_format VARCHAR(20) := 'MM/DD/YYYY';
l_date VARCHAR(20) := TO_CHAR(SYSDATE,l_date_format);
l_rec ebb_groups%ROWTYPE;

l_group_id ebb_groups.group_id%TYPE := '';
l_group_name ebb_groups.group_name%TYPE := '';
l_group_desc ebb_groups.group_desc%TYPE := '';
l_group_level ebb_groups.group_level%TYPE := '';
l_user_iswrite NUMBER(1):=0;

%>
<%
ebb_pageheader(p_dgrid=>'Y', p_dwin=>'Y');
%>
<body>
<%

zsi_bs_lib.InputHiddenBox(p_inputName=>'p_group_id');
%>
<table class="table">
<tr>
<th nowrap align="left">Group Name</th>
<th nowrap align="left">Description</th>
<th nowrap align="center">Level</th>
</tr>
<%
FOR i IN 1..5 LOOP
%>
<tr>
<td><input type="hidden" name="p_group_id" value="">
<input type="text" name="p_group_name" value="" class="form-control input-sm">
</td>
<td><input type="text" name="p_group_desc" value="" class="form-control input-sm"></td>
<td><input type="text" name="p_group_level" value="" class="form-control input-sm"></td>
</tr>
<%
END LOOP;
%>
</table>
<%
END IF;
%>
</form>
</body>
</html>

And 2nd file type is *.sql and are very similar to sql server syntax.

filename=ebb_wsresponse.sql

SET SCAN OFF
CREATE OR REPLACE
PROCEDURE ebb_wsresponse (p_ws_id IN VARCHAR2 default NULL,
p_job_id IN VARCHAR2 default NULL,
p_ws_response IN VARCHAR2 default NULL,
p_ws_url IN VARCHAR2 default NULL) IS
BEGIN
INSERT INTO ebb_job_ws (job_id, ws_id, ws_response, ws_url) VALUES (p_job_id, p_ws_id, p_ws_response, p_ws_url);

htp.p('{ "Code":"JOBCOMPLETED", "Job_Id":"' || p_job_id || '","Msg":"' || p_ws_response || '" }');
END;
/

SHOW ERR;

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Friday Apr 10, 2015 at 18:34 GMT


Note: There's already a PL-SQL mode in CM (http://codemirror.net/mode/sql/index.html?mime=text/x-plsql), so it's easy to enable in Brackets.
This can also be done in a simple extension. See https://github.com/adobe/brackets/wiki/Language-Support#defining-a-new-language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant