Posts

Showing posts from June, 2022

Next Scripting Framework

Next Scripting Framework  # How to invoke current class method:   package require nx nx::Class create Greeter {     :property name:required     :public method "hello" {} {         puts "Welcome ${:name}!"         :bye     }     :public method "bye" {} {         puts "Goodbye ${:name}!"     } } Greeter create g -name Anna g hello   # Inheritance Example:   # Inheritance Example package require nx nx::Class create Animal { :property name:required :public method "hello" {} { puts "Hello cute animal with the name ${:name}!" } } nx::Class create Dog -superclass Animal { :public method "bark" {} { puts "${:name} bark! bark! bark!" } } Dog create d -name Snoopy d bark Dog create d1 -name "Bobby" d1 bark d1 hello 

Postgres select columns names without default value

 PostgreSQL select column names where there is no default value :   SELECT column_name, column_default FROM information_schema.columns WHERE (table_schema, table_name) = ('public', 'test') AND column_default IS NULL ORDER BY ordinal_position;