You can subscribe to this list here.
2007 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(58) |
Mar
(126) |
Apr
(96) |
May
(42) |
Jun
(59) |
Jul
(80) |
Aug
(95) |
Sep
(99) |
Oct
(137) |
Nov
(54) |
Dec
(138) |
2009 |
Jan
(174) |
Feb
(83) |
Mar
(36) |
Apr
(22) |
May
(16) |
Jun
(11) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <cod...@go...> - 2009-05-27 15:49:33
|
Author: ke...@se... Date: Wed May 27 08:37:32 2009 New Revision: 1362 Modified: trunk/andro/clib/x6.js Log: Browse lookups now work much more smoothly. When user hits a key and a search is in progress it correctly aborts the search and starts a new one, so things keep making sense even if the user types very fast. Fixes issue 11 Status: verified Modified: trunk/andro/clib/x6.js ============================================================================== --- trunk/andro/clib/x6.js (original) +++ trunk/andro/clib/x6.js Wed May 27 08:37:32 2009 @@ -2922,8 +2922,13 @@ if(async) { this.http.onreadystatechange = function() { if(this.readyState!=4) return; - json.processPre(false); - json.process(); + // KFD 5/27/09 Google #11 + // When somebody is asking for a return + // string, you do not want to process + if(!returnString) { + json.processPre(false); + json.process(); + } if(callBack) callBack(); } } @@ -3124,7 +3129,6 @@ request: function(inp,val) { // First thing is to cancel current request if(this.JSON) { - console.log("Aborting"); //if(this.JSON.http) { // this.JSON.http.abort(); //} @@ -5155,6 +5159,57 @@ } } +// KFD 5/27/09 Google #11, create a separate object that handles +// grid requests, which automatically cancels +// previous requests. +x6gridJSON = { + JSON: false, + + request: function(gridObject) { + // First thing is to cancel current request + if(this.JSON) { + this.JSON = false; + } + + // The "addFilters" routine puts in all parms, but + // it does the very important task of figuring out + // if there is anything to do, and it writes the + // result to gridObject.doFetch. + // + // It would be nice not to create the JSON object + // until after the routine had determined if it were + // necessary, but unfortunately the routine puts the + // parms there if required, so that's how we have to + // do it. + this.JSON = new x6JSON('x6page',gridObject.zTable); + gridObject.addFilters(this.JSON); + if(!gridObject.doFetch) return; + // <<<-------- EARLY RETURN; + + x6.data.browseFetchHtml = ''; + if(gridObject.cntNoBlank==0) { + $(gridObject).find('.tbody').html(''); + return; + } + gridObject.gridParms(this.JSON); + + // Add the "exact match" parm if it is part of the + // the grid. Notice it is a one-timer + if($(gridObject).attr('x6exactPre')==1) { + this.JSON.addParm('x6exactPre',1); + $(gridObject).attr('x6exactPre',0); + } + + var json = this.JSON; + this.JSON.execute(false,true,true,function() { + console.log("you ran a search!"); + $(gridObject).find(".tbody").replaceWith(json.http.responseText); + $(gridObject).find('.tbody div:first').mouseover(); + }); + } +} + + /***im* x6plugins/grid * * NAME @@ -6022,38 +6077,53 @@ */ self.fetch = function(doFetch) { if(doFetch==null) doFetch=false; + + // KFD 5/27/09 Google #11 Refactor if user types quickly + // everything should still work smoothly, and + // user should see result from very last keystroke + // + // NOTE: The fetch(false) call comes from the keyUp() + // event on the grid search inputs. + x6gridJSON.request(this); + return; + // + // KFD 5/27/09 Google #11 (END) - // Initialize and then scan - var json = new x6JSON('x6page',this.zTable); - this.addFilters(json); - if(this.doFetch) { - // Clear the previous results - x6.data.browseFetchHtml = ''; - if(this.cntNoBlank==0) { - $(this).find('.tbody').html(''); - return; - } - this.gridParms(json); - - // Add the "exact match" parm if it is part of the - // the grid. Notice it is a one-timer - if($(this).attr('x6exactPre')==1) { - json.addParm('x6exactPre',1); - $(this).attr('x6exactPre',0); - } - - if( html = json.execute(false,false,true)) { - //json.process(); - // The standard path is to take data returned - // by the server and render it. This is safe - // even if the server does not return anything, - // because we initialized to an empty object. - $(this).find(".tbody").replaceWith(html); - $(this).find('.tbody div:first').mouseover(); - } - } - delete json; + // KFD 5/27/09, Google #11, all code below is + // now dead. Keep it around for + // a few months and then get rid of it. + // Initialize and then scan +// var json = new x6JSON('x6page',this.zTable); +// this.addFilters(json); +// +// if(this.doFetch) { +// // Clear the previous results +// x6.data.browseFetchHtml = ''; +// if(this.cntNoBlank==0) { +// $(this).find('.tbody').html(''); +// return; +// } +// this.gridParms(json); +// +// // Add the "exact match" parm if it is part of the +// // the grid. Notice it is a one-timer +// if($(this).attr('x6exactPre')==1) { +// json.addParm('x6exactPre',1); +// $(this).attr('x6exactPre',0); +// } +// +// if( html = json.execute(false,false,true)) { +// //json.process(); +// // The standard path is to take data returned +// // by the server and render it. This is safe +// // even if the server does not return anything, +// // because we initialized to an empty object. +// $(this).find(".tbody").replaceWith(html); +// $(this).find('.tbody div:first').mouseover(); +// } +// } +// delete json; } /* |
From: <cod...@go...> - 2009-05-27 14:50:08
|
Author: ke...@se... Date: Wed May 27 07:38:32 2009 New Revision: 1361 Modified: trunk/andro/clib/x6.js Log: Auto-complete fields now behave properly if the user types really fast. Fixes issue 24 Status: Verified Modified: trunk/andro/clib/x6.js ============================================================================== --- trunk/andro/clib/x6.js (original) +++ trunk/andro/clib/x6.js Wed May 27 07:38:32 2009 @@ -2911,7 +2911,7 @@ * ******* */ - this.execute = function(autoProcess,async,returnString) { + this.execute = function(autoProcess,async,returnString,callBack) { this.hadErrors = false; if(async==null) async = false; if(autoProcess==null) autoProcess=false; @@ -2924,6 +2924,7 @@ if(this.readyState!=4) return; json.processPre(false); json.process(); + if(callBack) callBack(); } } @@ -3113,6 +3114,43 @@ Universal x6 input keyup handler \* **************************************************************** */ +// KFD 5/27/09 Google #24, create a separate object that handles +// auto-complete (x6select) searches, which has only +// one active JSON object, and which is smart about +// cancelling prior searches if the user keeps typing. +var x6selectJSON = { + JSON: false, + + request: function(inp,val) { + // First thing is to cancel current request + if(this.JSON) { + console.log("Aborting"); + //if(this.JSON.http) { + // this.JSON.http.abort(); + //} + this.JSON = false; + } + this.JSON = new x6JSON('x6page',x6.p(inp,'x6seltab')); + + this.JSON.addParm('x6select','Y'); + this.JSON.addParm('gpletters',val); + // KFD 4/11/09 Sourceforge 2753358 provide values of + // other columns that must match + var cols = $(inp).prop('xMatches','').split(','); + var tab = $(inp).prop('xtableid'); + for(var x in cols) { + if(cols[x]=='') continue; + var value = $('#x6inp_'+tab+'_'+cols[x]).val(); + this.JSON.addParm('mtch_'+cols[x],value); + } + this.JSON.execute(true,true,false + ,function() { + x6inputs.x6select.display(inp,null,x6.data.x6select); + } + ); + } +} + var x6inputs = { // Key up is used to look for changed values because // you do not see an input's new value until the keyup @@ -3278,6 +3316,8 @@ x6.console.log("sel start: ",s.start) x6.console.log("sel end: ",s.end) x6.console.log("computed value:",val); + x6selectJSON.request(inp,val); + /* json = new x6JSON('x6page',x6.p(inp,'x6seltab')); json.addParm('x6select','Y'); json.addParm('gpletters',val); @@ -3292,6 +3332,7 @@ } json.execute(true); x6inputs.x6select.display(inp,null,x6.data.x6select); + */ x6.console.groupEnd(); return; } |
From: <cod...@go...> - 2009-05-26 17:50:08
|
Author: ke...@se... Date: Tue May 26 10:49:33 2009 New Revision: 1360 Modified: trunk/andro/lib/androX6.php Log: Allow PHP-level hooks before and after insert and update. In your x6 class file for table "customers" (for example), make any of the four methods customers_before_insert, customers_after_insert, customers_before_update, customers_after_update. All four take this form: function customers_before_insert($row) { row['column'] = 'value....'; return $row; } Where the routine accepts the row, modifies it, and returns it. Fixes issue 23 Status: Verified Modified: trunk/andro/lib/androX6.php ============================================================================== --- trunk/andro/lib/androX6.php (original) +++ trunk/andro/lib/androX6.php Tue May 26 10:49:33 2009 @@ -205,21 +205,41 @@ if($errors) return; if(!isset($row['skey'])) { + # KFD 5/26/09 Google Feature #23, hook inserts + $method = $table_id."_before_insert"; + if(method_exists($this,$method)) { + $row = $this->$method($row); + } $skey = SQLX_Insert($dd,$row); if(!errors()) { $row=SQL_OneRow( "Select * FROM {$dd['viewname']} WHERE skey = $skey" ); + # KFD 5/26/09 Google Feature #23, hook inserts + $method = $table_id."_after_insert"; + if(method_exists($this,$method)) { + $row = $this->$method($row); + } } x6Data('row',$row); } else { + # KFD 5/26/09 Google Feature #23, hook updates + $method = $table_id."_before_update"; + if(method_exists($this,$method)) { + $row = $this->$method($row); + } SQLX_Update($dd,$row); if(!errors()) { $skey = $row['skey']; $row=SQL_OneRow( "Select * FROM {$dd['viewname']} WHERE skey = $skey" ); + # KFD 5/26/09 Google Feature #23, hook updates + $method = $table_id."_after_update"; + if(method_exists($this,$method)) { + $row = $this->$method($row); + } x6Data('row',$row); } } |
From: <cod...@go...> - 2009-05-26 17:21:56
|
Author: ke...@se... Date: Tue May 26 10:21:13 2009 New Revision: 1359 Modified: trunk/andro/application/androBuild.php Log: Google Defect #22, a column depending upon itself is not a circular dependency. Modified: trunk/andro/application/androBuild.php ============================================================================== --- trunk/andro/application/androBuild.php (original) +++ trunk/andro/application/androBuild.php Tue May 26 10:21:13 2009 @@ -2161,6 +2161,8 @@ // KFD 12/21/07 How about filtering out dependencies based on // constraints? That makes much more sense. // EXPERIMENTAL EXPERIMENTAL tried w/project PROMAT + # Google defect #22, added code to filter out a column + # depending on itself. $sql = " INSERT INTO zdd.column_deps (table_id,column_id,table_dep,column_dep,automation_id) @@ -2170,6 +2172,7 @@ FROM zdd.colchainargs WHERE zdd.colchainargs.column_id_arg <> '' AND zdd.colchainargs.chain <> 'cons' + AND NOT (column_id = column_id_arg) "; $this->SQL($sql); |
From: Donald J. O. I. <do...@do...> - 2009-05-18 18:57:27
|
Hmm not sure why that was sent twice. ----- Original Message ----- From: "Donald J. Organ IV" <do...@do...> To: and...@li... Sent: Monday, May 18, 2009 2:54:59 PM Subject: Re: [Andro-hacker] [andro commit] r1356 - Google Issue #13, Javascript function that appends "hold" variables to a URL before jumping. Take a look at the docs here: http://code.google.com/p/support/wiki/IssueTracker#Integration_with_version_control Putting certain key words or phrases in the comments of a commit can actually close a ticket. This way we can mark things as fixed for commits and closed for version releases. So also try not to set bug reports to fixed or closed manually. :D ----- Original Message ----- From: cod...@go... To: and...@li... Sent: Monday, May 18, 2009 2:03:45 PM Subject: [Andro-hacker] [andro commit] r1356 - Google Issue #13, Javascript function that appends "hold" variables to a URL before jumping. Author: ke...@se... Date: Mon May 18 09:52:13 2009 New Revision: 1356 Modified: trunk/andro/clib/x6.js Log: Google Issue #13, Javascript function that appends "hold" variables to a URL before jumping. Modified: trunk/andro/clib/x6.js ============================================================================== --- trunk/andro/clib/x6.js (original) +++ trunk/andro/clib/x6.js Mon May 18 09:52:13 2009 @@ -473,6 +473,21 @@ } } +/* ---------------------------------------------------- *\ + + Add "hld_" variables to a link and go + Google Issue #13 + +\* ---------------------------------------------------- */ +function linkHolds(url) { + $('[id^=hld]').each( + function() { + url+='&'+$(this).attr('id')+'='+$(this).val(); + } + ); + window.location = url; +} + /* **************************************************************** *\ ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Andro-hacker mailing list And...@li... https://lists.sourceforge.net/lists/listinfo/andro-hacker ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Andro-hacker mailing list And...@li... https://lists.sourceforge.net/lists/listinfo/andro-hacker |
From: Donald J. O. I. <do...@do...> - 2009-05-18 18:56:02
|
Take a look at the docs here: http://code.google.com/p/support/wiki/IssueTracker#Integration_with_version_control Putting certain key words or phrases in the comments of a commit can actually close a ticket. This way we can mark things as fixed for commits and closed for version releases. So also try not to set bug reports to fixed or closed manually. :D ----- Original Message ----- From: cod...@go... To: and...@li... Sent: Monday, May 18, 2009 2:03:45 PM Subject: [Andro-hacker] [andro commit] r1356 - Google Issue #13, Javascript function that appends "hold" variables to a URL before jumping. Author: ke...@se... Date: Mon May 18 09:52:13 2009 New Revision: 1356 Modified: trunk/andro/clib/x6.js Log: Google Issue #13, Javascript function that appends "hold" variables to a URL before jumping. Modified: trunk/andro/clib/x6.js ============================================================================== --- trunk/andro/clib/x6.js (original) +++ trunk/andro/clib/x6.js Mon May 18 09:52:13 2009 @@ -473,6 +473,21 @@ } } +/* ---------------------------------------------------- *\ + + Add "hld_" variables to a link and go + Google Issue #13 + +\* ---------------------------------------------------- */ +function linkHolds(url) { + $('[id^=hld]').each( + function() { + url+='&'+$(this).attr('id')+'='+$(this).val(); + } + ); + window.location = url; +} + /* **************************************************************** *\ ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Andro-hacker mailing list And...@li... https://lists.sourceforge.net/lists/listinfo/andro-hacker |
From: <cod...@go...> - 2009-05-18 18:03:51
|
Author: ke...@se... Date: Mon May 18 09:52:13 2009 New Revision: 1356 Modified: trunk/andro/clib/x6.js Log: Google Issue #13, Javascript function that appends "hold" variables to a URL before jumping. Modified: trunk/andro/clib/x6.js ============================================================================== --- trunk/andro/clib/x6.js (original) +++ trunk/andro/clib/x6.js Mon May 18 09:52:13 2009 @@ -473,6 +473,21 @@ } } +/* ---------------------------------------------------- *\ + + Add "hld_" variables to a link and go + Google Issue #13 + +\* ---------------------------------------------------- */ +function linkHolds(url) { + $('[id^=hld]').each( + function() { + url+='&'+$(this).attr('id')+'='+$(this).val(); + } + ); + window.location = url; +} + /* **************************************************************** *\ |
From: <ken...@us...> - 2009-05-11 20:13:34
|
Revision: 1355 http://andro.svn.sourceforge.net/andro/?rev=1355&view=rev Author: kendowns Date: 2009-05-11 20:13:27 +0000 (Mon, 11 May 2009) Log Message: ----------- Added Paths: ----------- releases/2009.05.11/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-05-11 20:12:45
|
Revision: 1354 http://andro.svn.sourceforge.net/andro/?rev=1354&view=rev Author: kendowns Date: 2009-05-11 20:12:37 +0000 (Mon, 11 May 2009) Log Message: ----------- Added function httpWebPath() Modified Paths: -------------- trunk/andro/lib/androLib.php trunk/andro/lib/index_hidden.php Modified: trunk/andro/lib/androLib.php =================================================================== --- trunk/andro/lib/androLib.php 2009-04-27 15:43:17 UTC (rev 1353) +++ trunk/andro/lib/androLib.php 2009-05-11 20:12:37 UTC (rev 1354) @@ -9550,6 +9550,19 @@ .$x; } +function httpWebPath() { + $start = httpWebPagePath(); + $pos = strpos($start,'index.php'); + if($pos!==false) { + $start = substr($start,0,$pos-1); + } + $pos = strpos($start,'?'); + if($pos!==false) { + $start = substr($start,0,$pos-1); + } + return $start; +} + /*f* HTTP-Functions/httpWebSite * * NAME Modified: trunk/andro/lib/index_hidden.php =================================================================== --- trunk/andro/lib/index_hidden.php 2009-04-27 15:43:17 UTC (rev 1353) +++ trunk/andro/lib/index_hidden.php 2009-05-11 20:12:37 UTC (rev 1354) @@ -513,7 +513,8 @@ if(gp('x6select',false)) { $table_id = gp('x6page'); $gpletters= gp('gpletters'); - $matches = array(); + # KFD 4/11/09 Sourceforge 2753358 do real matches + $matches = aFromGp('mtch_'); $rows=RowsForSelect($table_id,$gpletters,$matches,'',true); foreach($rows as $idx=>$row) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-27 15:43:26
|
Revision: 1353 http://andro.svn.sourceforge.net/andro/?rev=1353&view=rev Author: kendowns Date: 2009-04-27 15:43:17 +0000 (Mon, 27 Apr 2009) Log Message: ----------- Added Paths: ----------- releases/2009.04.27/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-16 19:12:35
|
Revision: 1352 http://andro.svn.sourceforge.net/andro/?rev=1352&view=rev Author: kendowns Date: 2009-04-16 19:12:26 +0000 (Thu, 16 Apr 2009) Log Message: ----------- 1) Sourceforge 2769228, + and - keys inc/dec values of numeric fields 2) No sourceforge #, a routine named <table>_<column>_afterBlur(inp), if exists, will be called when a control loses focus. Modified Paths: -------------- trunk/andro/clib/x6.js Modified: trunk/andro/clib/x6.js =================================================================== --- trunk/andro/clib/x6.js 2009-04-15 22:35:08 UTC (rev 1351) +++ trunk/andro/clib/x6.js 2009-04-16 19:12:26 UTC (rev 1352) @@ -3290,11 +3290,26 @@ switch(type) { case 'int': x6.console.log("type validation for int"); + // KFD 4/16/09 Sourceforge 2769228 + if(keyLabel=='+' || keyLabel=='-') { + var val=Number($(inp).val()); + if(keyLabel=='+') val++; else val--; + $(inp).val(val); + return false; + break; + } if(!x6.keyIsNumeric(e)) return false; break; case 'numb': case 'money': x6.console.log("type validation for numb/money"); + // KFD 4/16/09 Sourceforge 2769228 + if(keyLabel=='+' || keyLabel=='-') { + var val=Number($(inp).val()); + if(keyLabel=='+') val++; else val--; + $(inp).val(val); + break; + } if(!x6.keyIsNumeric(e) && x6.keyLabel(e)!='.') return false; break; case 'date': @@ -3519,8 +3534,12 @@ return false; } inp.inblur = true; + // Get possible name of global function to handle afterBlur + var fBlur = 'afterBlur_' + + x6.p(inp,'xTableId') + + '_' + x6.p(inp,'xColumnId') // If method does not exist forget it - if(!inp.afterBlur) { + if(!inp.afterBlur && eval("typeof("+fBlur+")") !='function') { x6.console.log("No afterBlur(), leaving flag set and returning"); x6.console.groupEnd(); return true; @@ -3537,7 +3556,11 @@ // not be fired again for this value. It does not mean there // is anything particularly "valid" or correct about the // value. - if(inp.afterBlur()) { + var afterBlurResult + = inp.afterBlur + ? inp.afterBlur() + : eval(fBlur+"(inp)"); + if(afterBlurResult) { x6.console.log("Afterblurner setting flag false, return true"); x6.console.groupEnd(); inp.inblur = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-15 22:35:22
|
Revision: 1351 http://andro.svn.sourceforge.net/andro/?rev=1351&view=rev Author: kendowns Date: 2009-04-15 22:35:08 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Sourceforge 2766496 Modified Paths: -------------- trunk/andro/application/androBuild.php Modified: trunk/andro/application/androBuild.php =================================================================== --- trunk/andro/application/androBuild.php 2009-04-15 16:00:09 UTC (rev 1350) +++ trunk/andro/application/androBuild.php 2009-04-15 22:35:08 UTC (rev 1351) @@ -4327,12 +4327,19 @@ // little piece is sequenced. Notice for delete cascade we put it // at the front, so if there are any complex chains, they will all // be worked out before the rest of the trigger fires. + # KFD 4/15/09 Sourceforge 2766496 Moved delete cascade from before to + # after. This is rather counter-intuitive, but if the + # delete is in the BEFORE, and the child table has a SUM + # or some other reason to update the parent, the parent row + # is never actually deleted. Only the children are. And + # postgres says, "Query executed, 0 rows affected." + # If you move the child delete to the AFTER, it works. if ($this->zzArray($ufk,"delete_cascade")=="Y") { $prntList = str_replace("chd.","",$prntList); $s1 = "\n". " -- 6000 FK Delete cascades to child rows \n". " DELETE FROM ".$ufk["table_id_chd"]. " WHERE ".$prntList."; \n"; - $this->SpecDDL_TriggerFragment($ptab,"DELETE","BEFORE","0005",$s1); + $this->SpecDDL_TriggerFragment($ptab,"DELETE","AFTER","6000",$s1); } else { $s1 = "\n". This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-15 16:00:21
|
Revision: 1350 http://andro.svn.sourceforge.net/andro/?rev=1350&view=rev Author: kendowns Date: 2009-04-15 16:00:09 +0000 (Wed, 15 Apr 2009) Log Message: ----------- Sourceforge 2765788, conventional profile handle no kids gracefully. Modified Paths: -------------- trunk/andro/lib/androX6.php Modified: trunk/andro/lib/androX6.php =================================================================== --- trunk/andro/lib/androX6.php 2009-04-13 19:21:55 UTC (rev 1349) +++ trunk/andro/lib/androX6.php 2009-04-15 16:00:09 UTC (rev 1350) @@ -898,6 +898,13 @@ # Grab the data dictionary for this table $dd = $this->dd; $table_id = $this->dd['table_id']; + + # KFD 4/15/09 Sourceforge 2765788, handle no kids gracefully, + # work out how many kids there are to display + $kidCount = 0; + foreach($dd['fk_children'] as $child=>$info) { + if(trim(arr($info,'x6display',''))<>'none') $kidCount++; + } # Create the top level div as a table controller $top= new androHTMLTableController($table_id); @@ -914,6 +921,8 @@ # $hpane1 is the outer, it is what is left after removing # h1, one row of tabs, and padding at bottom. + # KFD 4/15/09 Sourceforge 2765788, if no kids, correct height + if($kidCount==0) $htabs = 0; $hpane1 = $hinside - $hh1 - $htabs - ($pad0 * 2); # $hchild is the height of the empty nested tab @@ -984,46 +993,49 @@ ,'x6table'=>$table_id ,'styles'=>array('overflow'=>'hidden') ); - $tabKids = $detail->addTabs('kids_'.$table_id,$hempty,$options); - $tabKids->ul->hp['xOffset'] = 2; - $tab = $tabKids->addTab("Hide"); - $idx = 0; - foreach($dd['fk_children'] as $child=>$info) { - # KFD 1/2/09. If x6display is 'none', skip it - if(trim(arr($info,'x6display',''))=='none') continue; - - $tc = $top->addTableController($child); - $tc->hp['x6tablepar'] = $table_id; - $tab = $tabKids->addTab($info['description']); - $tab->ap['x6tablePar'] = $table_id; - $tab->ap['x6table' ] = $child; - - if($info['x6childwrites']=='detail') { - # Create the basic detail - $modal = new androHTMLDetail($child,true,700,$table_id); - - # Now see if we need to add buttons - if(file_exists(fsDirtop()."application/x6$child.php")) { - include_once(fsDirtop()."application/x6$child.php"); - $childClass = 'x6'.$child; - $objChild = new $childClass; - $custom = $objChild->customButtons(); - $modal->addCustomButtons($custom); + # KFD 4/15/09 Sourcefroge 2765788 no kids handle gracefully + if($kidCount > 0) { + $tabKids = $detail->addTabs('kids_'.$table_id,$hempty,$options); + $tabKids->ul->hp['xOffset'] = 2; + $tab = $tabKids->addTab("Hide"); + $idx = 0; + foreach($dd['fk_children'] as $child=>$info) { + # KFD 1/2/09. If x6display is 'none', skip it + if(trim(arr($info,'x6display',''))=='none') continue; + + $tc = $top->addTableController($child); + $tc->hp['x6tablepar'] = $table_id; + $tab = $tabKids->addTab($info['description']); + $tab->ap['x6tablePar'] = $table_id; + $tab->ap['x6table' ] = $child; + + if($info['x6childwrites']=='detail') { + # Create the basic detail + $modal = new androHTMLDetail($child,true,700,$table_id); + + # Now see if we need to add buttons + if(file_exists(fsDirtop()."application/x6$child.php")) { + include_once(fsDirtop()."application/x6$child.php"); + $childClass = 'x6'.$child; + $objChild = new $childClass; + $custom = $objChild->customButtons(); + $modal->addCustomButtons($custom); + } + + # Tell framework to add it to the output. + addModal($modal); } - - # Tell framework to add it to the output. - addModal($modal); } + + # And then loop through extra tabs + foreach($this->appTabs as $child=>$caption) { + $top->addTableController($child); + $tab = $tabKids->addTab($caption); + $tab->hp['x6tablePar'] = $table_id; + $tab->hp['x6table' ] = $child; + } } - # And then loop through extra tabs - foreach($this->appTabs as $child=>$caption) { - $top->addTableController($child); - $tab = $tabKids->addTab($caption); - $tab->hp['x6tablePar'] = $table_id; - $tab->hp['x6table' ] = $child; - } - # tell the screen to start out by focusing on # the browse jqDocReady("x6events.fireEvent('objectFocus','{$grid->hp['id']}')"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-13 19:22:04
|
Revision: 1349 http://andro.svn.sourceforge.net/andro/?rev=1349&view=rev Author: kendowns Date: 2009-04-13 19:21:55 +0000 (Mon, 13 Apr 2009) Log Message: ----------- Added Paths: ----------- releases/2009.04.13.1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-13 19:21:07
|
Revision: 1348 http://andro.svn.sourceforge.net/andro/?rev=1348&view=rev Author: kendowns Date: 2009-04-13 19:20:57 +0000 (Mon, 13 Apr 2009) Log Message: ----------- Slight change to char/varchar support for SEQUENCE/SEQDEFAULT Modified Paths: -------------- trunk/andro/application/androBuild.php Modified: trunk/andro/application/androBuild.php =================================================================== --- trunk/andro/application/androBuild.php 2009-04-13 18:19:07 UTC (rev 1347) +++ trunk/andro/application/androBuild.php 2009-04-13 19:20:57 UTC (rev 1348) @@ -3595,12 +3595,14 @@ # make sure next sequence value will be after it. # KFD 4/11/09 Sourceforge 2753174 Support char/varchar $nextval = "nextval(##". $Seq . "##)"; + $compare = '0'; if($formshort=='char' || $formshort=='varchar') { - $nextval = "lpad($nextval::varchar,{$row['colprec']},##0##)"; + $nextval = "lpad($nextval::varchar,{$row['colprec']},##0##)"; + $compare = '####'; } $s1 = " -- 1011 sequence assignment\n". - " IF new.". $column_id . " IS NULL OR new.".$column_id."::int = 0 THEN \n". + " IF new.". $column_id . " IS NULL OR new.".$column_id." = $compare THEN \n". " new.". $column_id . " = $nextval;\n". " ELSE\n". " AnyInt = nextval(##$Seq##);\n". This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-13 18:19:17
|
Revision: 1347 http://andro.svn.sourceforge.net/andro/?rev=1347&view=rev Author: kendowns Date: 2009-04-13 18:19:07 +0000 (Mon, 13 Apr 2009) Log Message: ----------- Sourceforeg 2697638, Fallbacks on foreign keys Added Paths: ----------- releases/2009.04.13/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-13 18:18:03
|
Revision: 1346 http://andro.svn.sourceforge.net/andro/?rev=1346&view=rev Author: kendowns Date: 2009-04-13 18:17:58 +0000 (Mon, 13 Apr 2009) Log Message: ----------- Removed Paths: ------------- releases/2009.04.13/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-13 18:17:05
|
Revision: 1345 http://andro.svn.sourceforge.net/andro/?rev=1345&view=rev Author: kendowns Date: 2009-04-13 18:16:55 +0000 (Mon, 13 Apr 2009) Log Message: ----------- Sourceforge 2697638, Fallbacks on foreign keys Added Paths: ----------- releases/2009.04.13/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-13 18:15:23
|
Revision: 1344 http://andro.svn.sourceforge.net/andro/?rev=1344&view=rev Author: kendowns Date: 2009-04-13 18:15:18 +0000 (Mon, 13 Apr 2009) Log Message: ----------- Sourceforge 2697638, FALLBACK on foreign keys Modified Paths: -------------- trunk/andro/application/androBuild.php trunk/andro/lib/AndroDBB.add Modified: trunk/andro/application/androBuild.php =================================================================== --- trunk/andro/application/androBuild.php 2009-04-11 16:22:37 UTC (rev 1343) +++ trunk/andro/application/androBuild.php 2009-04-13 18:15:18 UTC (rev 1344) @@ -2659,8 +2659,8 @@ $results = $this->SQLRead("Select * FROM zdd.tabfky"); while ($row = pg_fetch_array($results)) { - $suffix = trim($row["suffix"]); - $prefix = trim($row["prefix"]); + $suffix = is_null($row['suffix']) ? '' : trim($row["suffix"]); + $prefix = is_null($row['prefix']) ? '' : trim($row["prefix"]); // Get details on pk/fk $fk = $pk = $both = $match = ""; $cols_list = $this->utabs[trim($row["table_id_par"])]["pk"]; @@ -2726,7 +2726,12 @@ "delete_cascade"=>$row["delete_cascade"], "prevent_fk_change"=>$row["prevent_fk_change"], "uidisplay"=>$row['uidisplay'], - "cols_chd"=>$fk, + # Sourceforge 2697638 fallback columns + 'fallback_column_id'=>$row['fallback_column_id'], + 'fallback_sort_column_id'=>$row['fallback_sort_column_id'], + 'fallback_group_column_id'=>$row['fallback_group_column_id'], + 'fallback_sort_asc'=>$row['fallback_sort_asc'], + "cols_chd"=>$fk, "cols_par"=>$pk, "cols_both"=>$both, "cols_match"=>$match); @@ -2739,7 +2744,7 @@ # we would break all kinds of things. $combo = trim($row["table_id"])."_". - trim($row['prefix'])."_". + $prefix."_". trim($row["table_id_par"])."_". $suffix; @@ -2756,6 +2761,11 @@ "delete_cascade"=>$row["delete_cascade"], "prevent_fk_change"=>$row["prevent_fk_change"], "uidisplay"=>$row['uidisplay'], + # Sourceforge 2697638 fallback columns + 'fallback_column_id'=>$row['fallback_column_id'], + 'fallback_sort_column_id'=>$row['fallback_sort_column_id'], + 'fallback_group_column_id'=>$row['fallback_group_column_id'], + 'fallback_sort_asc'=>$row['fallback_sort_asc'], "cols_chd"=>$fk, "cols_par"=>$pk, "cols_both"=>$both, @@ -2765,6 +2775,7 @@ $rc++; } + return $retval; } @@ -4042,7 +4053,9 @@ $this->LogEntry("Building Foreign Key clauses"); $retval = true; - foreach($this->ufks as $ufk) { + // KFD 4/13/09 Sourceforge 2697638 Must use the new corrected + // list of foreign keys + foreach($this->ufks2 as $ufk) { //$this->LogEntry("Attempting fk for ".$ufk["table_id_chd"]." to ".$ufk["table_id_par"]); $ptab = $ufk["table_id_par"]; $retval=$retval && $this->SpecDDL_Triggers_FK_PT( @@ -4164,14 +4177,13 @@ ." ErrorList = ErrorList || ##$chd,1005,Required Value;##;\n" ." END IF;\n"; } - $onEmpty .= + $onEmpty .= " -- 8001 FK Insert/Update Child Validation\n". " IF ". $nullList . " THEN\n". " --Error was reported above, not reported again\n". " --ErrorCount = ErrorCount + 1;\n". " --ErrorList = ErrorList || ##*,1005,Foreign key columns may not be null: ". $ufk["cols_chd"] . ";##;\n". " ELSE\n"; - } // If there is no match under normal circumstances, we get an error, @@ -4222,7 +4234,7 @@ // " ErrorCount = ErrorCount + 1;\n". // " ErrorList = ErrorList || ##*,1006,No match in ". $ptab . " for ". $ufk["cols_chd"] .";##;\n"; } - + $s1 = "\n". $onEmpty. @@ -4233,7 +4245,75 @@ $noMatch . " END IF;\n". " END IF;\n"; - // if the "allow_orphan" flag is set, do nothing + + # KFD 4/13/09 Sourceforge 2697638. Put in fallback processing. + # Note that this always happens, and happens before + # anything else, even if allow_orphans is true. + # But we must toss in the fragment now, just before + # tossing in the final generated fragements. + if($ufk['fallback_column_id']<>'') { + # TO DO: + # Find table that has this column as the primary key + $fallback_cid = $ufk['fallback_column_id']; + $fallback_sort = $ufk['fallback_sort_column_id'] == '' + ? $fallback_cid + : trim($ufk['fallback_sort_column_id']); + $res_col = $this->sqlread( + "Select table_id + from (select table_id,max(column_id) as cid + from zdd.tabflat + where primary_key = 'Y' + group by table_id + having count(*) = 1 + ) candidates + where candidates.cid = '$fallback_cid' + "); + $xrow = pg_fetch_array($res_col); + $fallback_tid = $xrow['table_id']; + + $SQL_fbg = ''; + if($ufk['fallback_group_column_id']) { + $fallback_gid = $ufk['fallback_group_column_id']; + $SQL_fbg = " + AND $fallback_gid = ( + SELECT $fallback_gid + FROM $fallback_tid + WHERE $fallback_cid = new.$fallback_cid + ) +"; + } + + $fbmatches = str_replace( + "new.$fallback_cid" + ,"$fallback_tid.$fallback_cid" + ,$mtchList + ); + + $sort_order = $ufk['fallback_sort_asc'] =='Y' ? 'ASC' : "DESC"; + $sort_compare= $sort_order == 'ASC' ? '>=' : '<='; + $s1=" + -- 8001 FK Fallback, if fk does not match, + SELECT into new.$fallback_cid $fallback_cid + FROM $fallback_tid + WHERE $fallback_sort $sort_compare ( + SELECT $fallback_sort + FROM $fallback_tid + WHERE $fallback_cid = new.$fallback_cid + ) + $SQL_fbg + AND EXISTS ( + SELECT skey FROM ". $ptab . " par + WHERE ".$fbmatches . " + ) + ORDER BY $fallback_sort $sort_order LIMIT 1;\n"; + $this->SpecDDL_TriggerFragment($ufk["table_id_chd"],"INSERT","BEFORE","8001",$s1,"FK:".$ufk["table_id_par"]); + $this->SpecDDL_TriggerFragment($ufk["table_id_chd"],"UPDATE","BEFORE","8001",$s1,"FK:".$ufk["table_id_par"]); + + } + + // if the "allow_orphan" flag is set, do nothing. This means + // we only load the trigger fragments if allow_orphans is not 'Y'. + // This also means auto-insert only works if orphans are not allowed. // EXPERIMENT KFD 6/11/06 if ($ufk["allow_orphans"]<>'Y') { $this->SpecDDL_TriggerFragment($ufk["table_id_chd"],"INSERT","BEFORE","8001",$s1,"FK:".$ufk["table_id_par"]); Modified: trunk/andro/lib/AndroDBB.add =================================================================== --- trunk/andro/lib/AndroDBB.add 2009-04-11 16:22:37 UTC (rev 1343) +++ trunk/andro/lib/AndroDBB.add 2009-04-13 18:15:18 UTC (rev 1344) @@ -767,6 +767,12 @@ column x6display { type_id: char; colprec: 10; description: x6 UI display method; } column uifiltercolumn { type_id: char; colprec: 35; description: UI Filter Column; } +// Sourceforge 2697638, Foreign key fallbacks +column fallback_column_id { type_id: vchar; colprec: 35; description: X; } +column fallback_sort_column_id { type_id: vchar; colprec: 35; description: X; } +column fallback_group_column_id { type_id: vchar; colprec: 35; description: X; } +column fallback_sort_asc { type_id: char; colprec: 1; description: X; } + table tabfky { module: datadict; description: Foreign Key Placements; @@ -780,6 +786,11 @@ column { table_id_par_comp; } column { primary_key; pk_change; uicolseq; uisearch; description; } column { descshort; } + + // Sourceforge 2697638, Foreign key fallbacks + column { fallback_column_id; + fallback_sort_column_id; fallback_group_column_id; fallback_sort_asc; + } column { auto_insert; copysamecols; } column { uicolseq; nocolumns; allow_empty; allow_orphans; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-11 16:22:42
|
Revision: 1343 http://andro.svn.sourceforge.net/andro/?rev=1343&view=rev Author: kendowns Date: 2009-04-11 16:22:37 +0000 (Sat, 11 Apr 2009) Log Message: ----------- 4 Sourceforge issues. Added Paths: ----------- releases/2009.04.11/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-11 16:20:48
|
Revision: 1342 http://andro.svn.sourceforge.net/andro/?rev=1342&view=rev Author: kendowns Date: 2009-04-11 16:20:39 +0000 (Sat, 11 Apr 2009) Log Message: ----------- Sourceforge 2753358, proper filtering of compound foreign key values on x6 interface. Modified Paths: -------------- trunk/andro/clib/x6.js trunk/andro/lib/androLib.php Modified: trunk/andro/clib/x6.js =================================================================== --- trunk/andro/clib/x6.js 2009-04-11 15:51:24 UTC (rev 1341) +++ trunk/andro/clib/x6.js 2009-04-11 16:20:39 UTC (rev 1342) @@ -3266,6 +3266,15 @@ json = new x6JSON('x6page',x6.p(inp,'x6seltab')); json.addParm('x6select','Y'); json.addParm('gpletters',val); + // KFD 4/11/09 Sourceforge 2753358 provide values of + // other columns that must match + var cols = $(inp).prop('xMatches','').split(','); + var tab = $(inp).prop('xtableid'); + for(var x in cols) { + if(cols[x]=='') continue; + var value = $('#x6inp_'+tab+'_'+cols[x]).val(); + json.addParm('mtch_'+cols[x],value); + } json.execute(true); x6inputs.x6select.display(inp,null,x6.data.x6select); x6.console.groupEnd(); Modified: trunk/andro/lib/androLib.php =================================================================== --- trunk/andro/lib/androLib.php 2009-04-11 15:51:24 UTC (rev 1341) +++ trunk/andro/lib/androLib.php 2009-04-11 16:20:39 UTC (rev 1342) @@ -3880,6 +3880,19 @@ } $input->ap['xTableIdPar'] = $colinfo['table_id_fko']; $input->ap['xMatches'] = a($colinfo,'matches'); + + # KFD 4/11/09 Sourceforge 2753358. For x6 only, build a list of + # pk cols that appear before this, and send them back + # as matches. + if($x6) { + $pkpar = explode(',',$ddfko['pks']); + $apkpre = array(); + foreach($pkpar as $pkparone) { + if($pkparone==$column_id) break; + $apkpre[]=$pkparone; + } + $input->ap['xMatches'] = implode(',',$apkpre); + } // If any columns are supposed to fetch from here, // set an event to go to server looking for fetches @@ -4187,7 +4200,7 @@ # Lay out the projection as a table and return it $tdx = $trtop->html('td'); $table = $tdx->html('table'); - $table->addClass('x4Detail'); + $table->addClass('x4Detail x6Detail'); $uiwithnext = 'N'; $td = false; # KFD 8/7/08, moved all options into the projection system @@ -4205,7 +4218,7 @@ } else { $tr = $table->h('tr'); - $tr->h('td',$dd['flat'][$column]['description'].':','x4Caption'); + $tr->h('td',$dd['flat'][$column]['description'].':','x4Caption x6Caption'); $td = $tr->h('td','','x4Input'); $td->addChild($input); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-11 15:51:33
|
Revision: 1341 http://andro.svn.sourceforge.net/andro/?rev=1341&view=rev Author: kendowns Date: 2009-04-11 15:51:24 +0000 (Sat, 11 Apr 2009) Log Message: ----------- Sourceforge 2753325 set proper expiration of User option cookie for display size. Modified Paths: -------------- trunk/andro/clib/x6.js trunk/andro/lib/x6useroptions.php Modified: trunk/andro/clib/x6.js =================================================================== --- trunk/andro/clib/x6.js 2009-04-11 15:37:29 UTC (rev 1340) +++ trunk/andro/clib/x6.js 2009-04-11 15:51:24 UTC (rev 1341) @@ -82,7 +82,10 @@ var expires = "; expires="+date.toGMTString(); } else var expires = ""; - document.cookie = name+"="+value+expires+"; path=/"; + // Sourceforge 2753325 Do not know why that path statement was + // there, got rid of it to make cookie work + //document.cookie = name+"="+value+expires+"; path=/"; + document.cookie = name+"="+value+expires+";"; } function readCookie(name) { Modified: trunk/andro/lib/x6useroptions.php =================================================================== --- trunk/andro/lib/x6useroptions.php 2009-04-11 15:37:29 UTC (rev 1340) +++ trunk/andro/lib/x6useroptions.php 2009-04-11 15:51:24 UTC (rev 1341) @@ -34,8 +34,10 @@ ?> <script> window.x6ChangeSkin = function(select) { - document.cookie - = "x6skin="+select.value+"; expires=12/31/2049 00:00:00;"; + // Sourceforge 2753325 use quirksmode-supplied set cookie + createCookie('x6skin',select.value,3650); + //document.cookie + // = "x6skin="+select.value+"; expires=12/31/2049 00:00:00;"; window.location.reload(true); } </script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-11 15:37:38
|
Revision: 1340 http://andro.svn.sourceforge.net/andro/?rev=1340&view=rev Author: kendowns Date: 2009-04-11 15:37:29 +0000 (Sat, 11 Apr 2009) Log Message: ----------- Sourceforge 2753136, update sequence when a SEQDEFAULT value is provided by user Sourceforge 2753174, allow SEQUENCE and SEQDEFAULT to work for char/varchar fields. Sourceforge 2753129, fix column dependencies when a chain argument uses typecasts. Modified Paths: -------------- trunk/andro/application/androBuild.php Modified: trunk/andro/application/androBuild.php =================================================================== --- trunk/andro/application/androBuild.php 2009-04-09 17:58:52 UTC (rev 1339) +++ trunk/andro/application/androBuild.php 2009-04-11 15:37:29 UTC (rev 1340) @@ -2149,6 +2149,8 @@ function SpecFlatten_ColumnDeps() { $retval=true; $this->LogEntry("COLUMN DEPENDENCIES: From Chains"); + // KFD 4/11/09 Sourceforge 2753129, remove typecasting + // from chain column arguments // KFD 5/30/07, add filtering out self-dependencies, we // don't need to know and it gives false sequencing errors // KFD 6/ 8/07, putting in the filter caused other problems, @@ -2163,7 +2165,8 @@ INSERT INTO zdd.column_deps (table_id,column_id,table_dep,column_dep,automation_id) SELECT DISTINCT table_id,column_id - ,table_id,column_id_arg,'EXTEND' + ,table_id + ,regexp_replace(column_id_arg,'::.*',''),'EXTEND' FROM zdd.colchainargs WHERE zdd.colchainargs.column_id_arg <> '' AND zdd.colchainargs.chain <> 'cons' @@ -3512,7 +3515,7 @@ function SpecDDL_Triggers_Defaults() { $this->LogEntry("Building default clauses"); $results = $this->SQLRead( - "SELECT table_id,column_id,automation_id,formshort,auto_formula,type_id". + "SELECT table_id,column_id,automation_id,formshort,colprec,auto_formula,type_id". " FROM zdd.tabflat ". " WHERE automation_id IN ('BLANK','DEFAULT','SEQUENCE','SEQDEFAULT','TS_INS','UID_INS','TS_UPD','UID_UPD','QUEUEPOS','TS_UPD_PG','UID_UPD_PG')" ); @@ -3522,7 +3525,7 @@ $table_id = $row["table_id"]; $column_id = trim($row["column_id"]); $automation_id = trim(strtoupper($row["automation_id"])); - $formshort = $row["formshort"]; + $formshort = trim($row["formshort"]); if ($automation_id=="SEQUENCE") { $s1 = "\n". @@ -3552,10 +3555,15 @@ " END IF;\n"; } $Seq = $this->DBB_SequenceName($table_id,$row["auto_formula"],$column_id); + # KFD 4/11/09 Sourceforge 2753174 Support char/varchar + $nextval = "nextval(##". $Seq . "##)"; + if($formshort=='char' || $formshort=='varchar') { + $nextval = "lpad($nextval::varchar,{$row['colprec']},##0##)"; + } $s1 = " -- 1011 sequence/default assignment\n". " IF new.". $column_id . " IS NULL THEN \n". - " new.". $column_id . " = nextval(##". $Seq . "##);\n". + " new.". $column_id . " = $nextval;\n". $nlist. " END IF;\n"; $this->SpecDDL_TriggerFragment($table_id,"INSERT","BEFORE","1011",$s1); @@ -3571,11 +3579,25 @@ " END IF;\n"; $this->SpecDDL_TriggerFragment($table_id,"UPDATE","BEFORE","1010",$s1); - $Seq = $this->DBB_SequenceName($table_id,$row["auto_formula"],$column_id); + $Seq = $this->DBB_SequenceName($table_id,$row["auto_formula"],$column_id); + # KFD 4/11/09 Sourceforge 2753136 If SEQDEFAULT value is provided, + # make sure next sequence value will be after it. + # KFD 4/11/09 Sourceforge 2753174 Support char/varchar + $nextval = "nextval(##". $Seq . "##)"; + if($formshort=='char' || $formshort=='varchar') { + $nextval = "lpad($nextval::varchar,{$row['colprec']},##0##)"; + } $s1 = " -- 1011 sequence assignment\n". - " IF new.". $column_id . " IS NULL OR new.".$column_id." = 0 THEN \n". - " new.". $column_id . " = nextval(##". $Seq . "##);\n". + " IF new.". $column_id . " IS NULL OR new.".$column_id."::int = 0 THEN \n". + " new.". $column_id . " = $nextval;\n". + " ELSE\n". + " AnyInt = nextval(##$Seq##);\n". + " IF AnyInt < new.$column_id::int THEN\n". + " perform setval(##$Seq##,new.$column_id::int);\n". + " ELSE\n". + " perform setval(##$Seq##,AnyInt-1);\n". + " END IF;\n". " END IF;\n"; $this->SpecDDL_TriggerFragment($table_id,"INSERT","BEFORE","1011",$s1); @@ -6779,12 +6801,17 @@ $this->PlanMake_Security(); // 11/27/06, fix all sequences so they are always safe - $res=$this->SQLRead("Select table_id,column_id FROM zdd.tabflat + $res=$this->SQLRead("Select table_id,column_id,formshort FROM zdd.tabflat Where automation_id in ('SEQUENCE','SEQDEFAULT')"); while ($row=pg_fetch_array($res)) { $tid=$row['table_id']; $cid=$row['column_id']; $seq=$tid."_SEQ_".$cid; + # KFD 4/11/09 Sourceforge 2753174, support char/varchar for + # SEQUENCE and SEQDEFAULT + if(in_array(trim($row['formshort']),array('char','varchar'))) { + $cid.='::int'; + } $sq="SELECT SETVAL(#$seq#,(SELECT MAX($cid) FROM $tid)+1)"; $this->PlanMakeEntry("6050",$sq); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-09 17:58:55
|
Revision: 1339 http://andro.svn.sourceforge.net/andro/?rev=1339&view=rev Author: kendowns Date: 2009-04-09 17:58:52 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Added Paths: ----------- releases/2009.04.09/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ken...@us...> - 2009-04-09 17:58:26
|
Revision: 1338 http://andro.svn.sourceforge.net/andro/?rev=1338&view=rev Author: kendowns Date: 2009-04-09 17:58:15 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Slip in skey and _source for non-UNION queries. Modified Paths: -------------- trunk/andro/lib/androPage.php Modified: trunk/andro/lib/androPage.php =================================================================== --- trunk/andro/lib/androPage.php 2009-04-06 18:43:16 UTC (rev 1337) +++ trunk/andro/lib/androPage.php 2009-04-09 17:58:15 UTC (rev 1338) @@ -709,6 +709,12 @@ // Collapse the lists into strings $SQL_COLS=implode("\n ,",$SQL_COLSA); + # KFD 4/9/09. Slip in skey and source from first table. + $tables= array_keys($yamlP2['table']); + $skeytable = $tables[0]; + $SQL_COLS = $skeytable.".skey,'$skeytable' as _source," + .$SQL_COLS; + $SQL_COLSOB=''; if ( isset( $yamlP2['orderby'] ) ) { $SQL_COLSOB="\n ORDER BY " .$yamlP2['orderby']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |