Red Gate forums :: View topic - Command Line (batch) formatting
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 6
SQL Prompt 6 forum

Command Line (batch) formatting

Search in SQL Prompt 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Chillier



Joined: 19 Mar 2014
Posts: 8
Location: Norway

PostPosted: Wed Mar 19, 2014 1:58 pm    Post subject: Command Line (batch) formatting Reply with quote

We would like to make a Jenkins task to format our SQL before committing. Is there a way to specify a "command line" command to format Question
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 249
Location: Red Gate Software

PostPosted: Thu Mar 20, 2014 10:17 am    Post subject: Reply with quote

Hi Chiller,
Unfortunately there's no way to get prompt to run from the command line at the moment.

Could I ask how you'd want this to work? A command line exe that'd take in a .sql file and an exported .sqlpromptstyle file that then writes out a new formatted .sql file?

Thanks,
Aaron.
Back to top
View user's profile Send private message
Chillier



Joined: 19 Mar 2014
Posts: 8
Location: Norway

PostPosted: Thu Mar 20, 2014 10:29 am    Post subject: Reply with quote

Hei -

Thanks, but not sure. We just want to automate the action of applying a standard formatting before committing.

When we commit, we want the diff to show our actual changes, not programmer-specific formatting changes.... so we want to automagically apply the same formatting template to all SQL code.

mvh Charles
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 249
Location: Red Gate Software

PostPosted: Thu Mar 20, 2014 10:56 am    Post subject: Reply with quote

Are you using SQL Source Control to commit your changes?

We've had a request to automatically add prompt formatting in the commit tab on UserVoice here which sounds like it'd be exactly what you need?
Back to top
View user's profile Send private message
Chillier



Joined: 19 Mar 2014
Posts: 8
Location: Norway

PostPosted: Thu Mar 20, 2014 11:09 am    Post subject: Reply with quote

Sounds right to me - I'll have to ask if they had other motives for using Jenkins ... but sounds right to me. I'll check.
Back to top
View user's profile Send private message
Chillier



Joined: 19 Mar 2014
Posts: 8
Location: Norway

PostPosted: Thu Mar 20, 2014 11:25 am    Post subject: Reply with quote

Should be OK to add formatting in the commit tab - preferably if we could specify the (standard) format template to be used. The objective would be compromised if everyone uses their own personal formatting before committing, even if automagically.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 249
Location: Red Gate Software

PostPosted: Fri Mar 21, 2014 12:26 pm    Post subject: Reply with quote

Hi Charles,

I've let our SQL Source Control team know that you'd like this feature. It sounds like a really good idea, please do vote on the UserVoice request as it helps them to prioritise which features to work on next.

Thanks,
Aaron.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group