[squeak-dev] PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

gettimothy gettimothy at zoho.com
Sun Feb 25 09:47:52 UTC 2018


Poking around a bit, it appears that down is up and up is down.

If you go to 



PG3SchemaChanges >> uploadAll

 changes do: [ :each | 
 each isRemoteOnly ifFalse: [ 
 each saveToDatabase ] ].
 self refresh


PG3SchemaChanges >>downloadAll


 changes do: [ :each | 
 each isLocalOnly ifFalse: [ 
 each saveIntoSchemaMirror ] ].
 self refresh
 

yikes. I am afraid to push the buttons!







---- On Sun, 25 Feb 2018 04:38:14 -0500 gettimothy<gettimothy at zoho.com> wrote ---- 

    Hi all. 
  
 
  While writing the PostgresV3 help, I am following  Balázs Kósi-2 example here: http://forum.world.st/Status-of-PostgresV3-td4780110.html 
  
 
  In the section on SchemaMirror  
  
     
 To create a schema mirror, subclass PG3SchemaMirror and implement its pool and schema class side methods. 
 
 YourSchemaMirror class >> pool 
 
     ^YourConnectionPool default 
 
 
 YourSchemaMirror class >> schema 
 
     ^’schema_name’ 
 
 
 Schema mirrors mirror the functions in your database and provide an interface to call them. There is a little tool to inspect the differences between the methods of the schema mirror and the functions in the database, which can be invoked by: 
 
 YourSchemaMirror browseChanges 
 
 You can up and download functions via this interface. In earlier times we would write the database functions in pgAdmin3 and download them into the image. Nowadays we use the smalltalk browser to write the plpgsql code. You can set the autocommit behavior with: 
 
 YourSchemaMirror commitOnAccept: true  
I have this beautiful tool that lists all the functions in my schema and it has buttons "Download All" and "Upload All" etc. 
  
 
  My question are "Which way is Up" and "Which way is Down"? 
  
 
  What I want to accomplish is this direction [My database] ---->[Squeak] 
  
 
  I am guessing that I want to Upload, BUT  for documentation purposes I want to be clear. Also,  I don't want to have to re-import the functions. 
  
 
  thx 
  
 
  
 
  
 
  
 
  
 
  
 
 
 
 
 
 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180225/55280652/attachment.html>


More information about the Squeak-dev mailing list