PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
tty
Reply | Threaded
Open this post in threaded view
|

PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

tty
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










tty
Reply | Threaded
Open this post in threaded view
|

Re: PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

tty
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<[hidden email]> 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














Reply | Threaded
Open this post in threaded view
|

Re: PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

Levente Uzonyi
In reply to this post by tty
Hello Timothy,

On Sun, 25 Feb 2018, gettimothy wrote:

> 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"?

Download means to download the functions from the database server into
your image. Upload means the opposite direction.

You can also do this method-by-method using the context menu of the listed
functions. There's also an option there to delete the function from the
database.

>
> 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.
>

So, you want to Download.

Levente

> thx
>
>
>
>
>
>
>
>
>
>

tty
Reply | Threaded
Open this post in threaded view
|

Re: PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

tty
Thank you Levente.

BTW, I have started the PostgresV3-Help classes and would like to start committing them to the project.

Can you recommend a way to get the mcz submitted?

Perhaps I can create a personal github account and put it there for you guys to grab?

thx



---- On Sun, 25 Feb 2018 07:03:30 -0500 Levente Uzonyi <[hidden email]> wrote ----
Hello Timothy,

On Sun, 25 Feb 2018, gettimothy wrote:

> 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"?

Download means to download the functions from the database server into
your image. Upload means the opposite direction.

You can also do this method-by-method using the context menu of the listed
functions. There's also an option there to delete the function from the
database.

>
> 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.
>

So, you want to Download.

Levente

> thx
>
>
>
>
>
>
>
>
>
>





tty
Reply | Threaded
Open this post in threaded view
|

Re: PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

tty
In reply to this post by Levente Uzonyi
Hi Levente.

I have modified one of the PostgresV3 help pages on schema mirror and added your clarification:


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. 


Download means to download the functions from the database server into your  image. 
Upload means to upload from Sqeuak to the database.

Download = DB->Squeak
Upload = Squeak->DB. 

You can also do this method-by-method using the context menu of the listed 
functions. There''s also an option there to delete the function from the 
database. 


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 and upload them to the DB. 

Cheers.

t


---- On Sun, 25 Feb 2018 07:03:30 -0500 Levente Uzonyi<[hidden email]> wrote ----
Hello Timothy,

On Sun, 25 Feb 2018, gettimothy wrote:

> 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"?

Download means to download the functions from the database server into
your image. Upload means the opposite direction.

You can also do this method-by-method using the context menu of the listed
functions. There's also an option there to delete the function from the
database.

>
> 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.
>

So, you want to Download.

Levente

> thx
>
>
>
>
>
>
>
>
>
>





Reply | Threaded
Open this post in threaded view
|

Re: PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

Levente Uzonyi
In reply to this post by tty
On Sun, 25 Feb 2018, gettimothy wrote:

> Thank you Levente.
> BTW, I have started the PostgresV3-Help classes and would like to start committing them to the project.
>
> Can you recommend a way to get the mcz submitted?
>
> Perhaps I can create a personal github account and put it there for you guys to grab?

If you have an account on squeaksource.com, I can add you to the project
as developer, so that you can commit the mcz directly to the repository.

Levente

>
> thx
>
>
>
> ---- On Sun, 25 Feb 2018 07:03:30 -0500 Levente Uzonyi <[hidden email]> wrote ----
>       Hello Timothy,
>
>       On Sun, 25 Feb 2018, gettimothy wrote:
>
>       > 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"?
>
>       Download means to download the functions from the database server into
>       your image. Upload means the opposite direction.
>
>       You can also do this method-by-method using the context menu of the listed
>       functions. There's also an option there to delete the function from the
>       database.
>
>       >
>       > 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.
>       >
>
>       So, you want to Download.
>
>       Levente
>
>       > thx
>       >
>       >
>       >
>       >
>       >
>       >
>       >
>       >
>       >
>       >
>
>
>
>
>
>

tty
Reply | Threaded
Open this post in threaded view
|

Re: PostgresV3 SchemaMirror browseChanges Upload All vs Download All . Which way is which?

tty

I will get that done this week.

thx

>If you have an account on squeaksource.com, I can add you to the project 
>as developer, so that you can commit the mcz directly to the repository. 

>Levente