|
We're extremely pleased to announce SharpPlus Sqlite Developer ver2.6.4>> What's new: - [Schema Editor] Fixed some memory and resource leak.
- [SQL Editor] Add SQL Formatter(Alpha)
In the SQL Editor, you can press Ctrl+B or click the SQL Formmat button to format current sql. Note: SQL Formatter still at alpha stage, please save your sql before formatting Known issues: 1. SQL Formatter now does not reserve the comment in sql 2. SQL Formatter can only format complete and syntax correct sql
SQL Formatter Example:before formatting: select obj.run, obj.camCol, str(obj.field, 3) as field, str(obj.rowc, 6, 1) as rowc, str(obj.colc, 6, 1) as colc, str(fObj(obj.objId), 4) as id, str(obj.psfMag_g - 0*obj.extinction_g, 6, 3) as g, str(obj.psfMag_r - 0*obj.extinction_r, 6, 3) as r, str(obj.psfMag_i - 0*obj.extinction_i, 6, 3) as i, str(obj.psfMag_z - 0*obj.extinction_z, 6, 3) as z, str(60*distance, 3, 1) as D, fField(neighborObjId) as nfield, str(fObj(neighborObjId), 4) as nid,'new' as 'new' from (select obj.objId, run, camCol, field, rowc, colc, psfMag_u, extinction_u, psfMag_g, extinction_g, psfMag_r, extinction_r, psfMag_i, extinction_i, psfMag_z, extinction_z, NN.neighborObjId, NN.distance from photoObj as obj join neighbors as NN on obj.objId = NN.objId where 60*NN.distance between 0 and 15 and NN.mode = 1 and NN.neighborMode = 1 and run = 756 and camCol = 5 and obj.type = 6 and (obj.flags & 40006) = 0 and nchild = 0 and obj.psfMag_i < 20 and (g - r between 0.3 and 1.1 and r - i between -0.1 and 0.6) ) as obj join photoObj as nobj on nobj.objId = obj.neighborObjId where nobj.run = obj.run and (abs(obj.psfMag_g - nobj.psfMag_g) < 0.5 or abs(obj.psfMag_r - nobj.psfMag_r) < 0.5 or abs(obj.psfMag_i - nobj.psfMag_i) < 0.5) order by obj.run, obj.camCol, obj.field after formatting: SELECT obj.run , obj.camCol , str( obj.field , 3 ) AS Field , str( obj.rowc , 6 , 1 ) AS Rowc , str( obj.colc , 6 , 1 ) AS Colc , str( fObj( obj.objId ) , 4 ) AS Id , str( obj.psfMag_g - 0 * obj.extinction_g , 6 , 3 ) AS G , str( obj.psfMag_r - 0 * obj.extinction_r , 6 , 3 ) AS R , str( obj.psfMag_i - 0 * obj.extinction_i , 6 , 3 ) AS I , str( obj.psfMag_z - 0 * obj.extinction_z , 6 , 3 ) AS Z , str( 60 * Distance , 3 , 1 ) AS D , fField( Neighborobjid ) AS Nfield , str( fObj( Neighborobjid ) , 4 ) AS Nid , 'new' AS 'new' FROM ( SELECT obj.objId , Run , Camcol , Field , Rowc , Colc , Psfmag_u , Extinction_u , Psfmag_g , Extinction_g , Psfmag_r , Extinction_r , Psfmag_i , Extinction_i , Psfmag_z , Extinction_z , NN.neighborObjId , NN.distance FROM Photoobj AS Obj JOIN Neighbors AS Nn ON obj.objId = NN.objId WHERE 60 * NN.distance BETWEEN 0 AND 15 AND NN.mode = 1 AND NN.neighborMode = 1 AND Run = 756 AND Camcol = 5 AND obj.type = 6 AND ( obj.flags & 40006 ) = 0 AND Nchild = 0 AND obj.psfMag_i < 20 AND ( G - R BETWEEN 0.3 AND 1.1 AND R - I BETWEEN -0.1 AND 0.6 ) ) AS Obj JOIN Photoobj AS Nobj ON nobj.objId = obj.neighborObjId WHERE nobj.run = obj.run AND ( abs( obj.psfMag_g - nobj.psfMag_g ) < 0.5 OR abs( obj.psfMag_r - nobj.psfMag_r ) < 0.5 OR abs( obj.psfMag_i - nobj.psfMag_i ) < 0.5 ) ORDER BY obj.run , obj.camCol , obj.field ;
|
|