#533 ooSQLite NULL output presentation

ooSQLite.1.0.0
closed
ooSQLite (9)
complete
1
2013-05-19
2013-02-07
No

This is a request for a new attribute in the ooSQLiteConnection class that allows for temporarily changing the current default (.NIL) to a different value to represent a database NULL value.

Related

Feature Requests: #533

Discussion

  • Mark Miesfeld

    Mark Miesfeld - 2013-02-07
    • labels: --> ooSQLite
    • status: unread --> open
    • milestone: v4.2.0 --> ooSQLite.1.0.0
     
  • Mark Miesfeld

    Mark Miesfeld - 2013-03-24
    • status: open --> accepted
    • assigned_to: Mark Miesfeld
    • pending_work_items: none --> doc
     
  • Mark Miesfeld

    Mark Miesfeld - 2013-03-24

    Committed revision 9134. [r9134] implementation.

    Still need to do doc.

    Staffan, if you want to try this: The attribute null has been added to the ooSQLite, ooSQLiteConn, and ooSQLiteStmt classes. This attribute is the representation of SQL NULL.

    By default this is the .nil object. For ooSQLiteConn, if not explicitly changed, the attribute is set to whatever the current ooSQLite attribute is. For ooSQLiteStmt, if not explicitly changed, the attribute is set to the ooSQLiteConn attribute.

     

    Related

    Commit: [r9134]

  • Staffan Tylen

    Staffan Tylen - 2013-03-26

    Mark, sorry for the delay. I've run a simple test but have probably not
    fully understood how it works. This is the trace output from my test:

     2 *-* say .oosqlite~version
       >>>   "ooSQLite Version 1.0.0.9139 (32 bit) (Encryption enabled)?"
    

    ooSQLite Version 1.0.0.9139 (32 bit) (Encryption enabled)

     4 *-* db="testnull.db"
       >>>   "testnull.db"
     5 *-* conn=.oosqliteconnection~new(db)
       >>>   "an ooSQLiteConnection"
     6 *-* say conn~null
       >>>   "The NIL object"
    

    The NIL object
    7 - say conn~null="????"
    >>> "0"
    0
    8 - say conn~null
    >>> "The NIL object"
    The NIL object
    9 - exit

    As you can see nothing seems to change. Is it just my bad day again?

    Staffan

    On Sun, Mar 24, 2013 at 9:08 PM, Mark Miesfeld miesfeld@users.sf.netwrote:

    • status: open --> accepted
    • assigned_to: Mark Miesfeld
    • pending_work_items: none --> doc

    Status: accepted
    Labels: ooSQLite
    Created: Thu Feb 07, 2013 04:56 PM UTC by Staffan Tylen
    Last Updated: Thu Feb 07, 2013 05:38 PM UTC
    Owner: Mark Miesfeld

    This is a request for a new attribute in the ooSQLiteConnection class that
    allows for temporarily changing the current default (.NIL) to a different
    value to represent a database NULL value.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/oorexx/feature-requests/533/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

     

    Related

    Feature Requests: #533

  • Mark Miesfeld

    Mark Miesfeld - 2013-03-27

    Hi Staffan,

    I didn't get an e-mail notice for your last post or I would have replied earlier. This works as of today:

    !/usr/bin/rexx

    .ooSQLite~recordFormat = .ooSQLite~OO_ARRAY_OF_ARRAYS
    dbName = 'ooFoods.rdbx'

    dbConn = .ooSQLiteConnection~new(dbName, .ooSQLite~OPEN_READWRITE)

    say 'dbConn~null:' dbConn~null
    dbConn~null = '????'
    say 'dbConn~null now:' dbConn~null

    dbConn~close

    ::requires 'ooSQLite.cls'

    C:\work.ooRexx\wc\incubator\ooSQLite\testing>test.rex
    dbConn~null: The NIL object
    dbConn~null now: ????

    Actually in my first implementation I hadn't fixed up the exec() method, but things are now complete. You're test should have worked I think, as you show above. But, if you had tried something with exec() it wouldn't have.

     
  • Mark Miesfeld

    Mark Miesfeld - 2013-03-27

    Committed revision 9142. [r9142] doc
    Committed revision 9143. [r9143] last implementation details.

     

    Related

    Commit: [r9142]
    Commit: [r9143]

  • Mark Miesfeld

    Mark Miesfeld - 2013-03-27
    • status: accepted --> pending
    • pending_work_items: doc --> complete
     
  • Staffan Tylen

    Staffan Tylen - 2013-03-28

    Hi Mark,

    Hmmm, my little test still doesn't work, here is the trace output:

     2 *-* say .oosqlite~version
       >>>   "ooSQLite Version 1.0.0.9143 (32 bit) (Encryption enabled)?"
    

    ooSQLite Version 1.0.0.9143 (32 bit) (Encryption enabled)

     4 *-* db="testnull.db"
       >>>   "testnull.db"
     5 *-* conn=.oosqliteconnection~new(db)
       >>>   "an ooSQLiteConnection"
     6 *-* say conn~null
       >>>   "The NIL object"
    

    The NIL object
    7 - say conn~null="????"
    >>> "0"
    0
    8 - say conn~null
    >>> "The NIL object"
    The NIL object
    9 - exit

    Why does line 8 return NIL? I am hoping for '????'. Is it perhaps because I
    have no additional parameters when I create the connection?
    Here is the code if you want to try.

    trace r
    say .oosqlite~version
    db="testnull.db"
    conn=.oosqliteconnection~new(db)
    say conn~null
    say conn~null="????"
    say conn~null
    exit

    Staffan

    On Thu, Mar 28, 2013 at 12:41 AM, Mark Miesfeld miesfeld@users.sf.netwrote:

    Committed revision 9142. [r9142]http://sourceforge.net/p/oorexx/code-0/9142/doc
    Committed revision 9143. [r9143]http://sourceforge.net/p/oorexx/code-0/9143/last implementation details.


    Status: pending
    Labels: ooSQLite
    Created: Thu Feb 07, 2013 04:56 PM UTC by Staffan Tylen
    Last Updated: Wed Mar 27, 2013 11:38 PM UTC
    Owner: Mark Miesfeld

    This is a request for a new attribute in the ooSQLiteConnection class that
    allows for temporarily changing the current default (.NIL) to a different
    value to represent a database NULL value.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/oorexx/feature-requests/533/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Commit: [r9142]
    Commit: [r9143]
    Feature Requests: #533

  • Rick McGuire

    Rick McGuire - 2013-03-28

    You are not using the null assignment method correctly. The instruction

    say conn~null="????"

    does not invoke the "NULL=" method, it merely displays the result of
    comparing the value returned by "conn~null" to "????", which is "0"
    (false). Remove the SAY keyword from the instruction and this should work.

    Rick

    On Wed, Mar 27, 2013 at 8:19 PM, Staffan Tylen st2430@users.sf.net wrote:

    Hi Mark,

    Hmmm, my little test still doesn't work, here is the trace output:

     2 *-* say .oosqlite~version
       >>>   "ooSQLite Version 1.0.0.9143 (32 bit) (Encryption enabled)?"
    

    ooSQLite Version 1.0.0.9143 (32 bit) (Encryption enabled)

     4 *-* db="testnull.db"
       >>>   "testnull.db"
     5 *-* conn=.oosqliteconnection~new(db)
       >>>   "an ooSQLiteConnection"
     6 *-* say conn~null
       >>>   "The NIL object"
    

    The NIL object
    7 - say conn~null="????"
    >>> "0"
    0
    8 - say conn~null
    >>> "The NIL object"
    The NIL object
    9 - exit

    Why does line 8 return NIL? I am hoping for '????'. Is it perhaps because I
    have no additional parameters when I create the connection?
    Here is the code if you want to try.

    trace r
    say .oosqlite~version
    db="testnull.db"
    conn=.oosqliteconnection~new(db)
    say conn~null
    say conn~null="????"
    say conn~null
    exit

    Staffan

    On Thu, Mar 28, 2013 at 12:41 AM, Mark Miesfeld <miesfeld@users.sf.net

    wrote:

    Committed revision 9142. [r9142]<
    http://sourceforge.net/p/oorexx/code-0/9142/>doc
    Committed revision 9143. [r9143]<
    http://sourceforge.net/p/oorexx/code-0/9143/>last implementation details.


    Status: pending
    Labels: ooSQLite
    Created: Thu Feb 07, 2013 04:56 PM UTC by Staffan Tylen
    Last Updated: Wed Mar 27, 2013 11:38 PM UTC
    Owner: Mark Miesfeld

    This is a request for a new attribute in the ooSQLiteConnection class
    that
    allows for temporarily changing the current default (.NIL) to a different
    value to represent a database NULL value.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/oorexx/feature-requests/533/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/


    [feature-requests:#533] ooSQLite NULL output presentation

    Status: pending
    Labels: ooSQLite
    Created: Thu Feb 07, 2013 04:56 PM UTC by Staffan Tylen
    Last Updated: Wed Mar 27, 2013 11:41 PM UTC
    Owner: Mark Miesfeld

    This is a request for a new attribute in the ooSQLiteConnection class that
    allows for temporarily changing the current default (.NIL) to a different
    value to represent a database NULL value.


    Sent from sourceforge.net because you indicated interest in <
    https://sourceforge.net/p/oorexx/feature-requests/533/>

    To unsubscribe from further messages, please visit <
    https://sourceforge.net/auth/subscriptions/>

     

    Related

    Commit: [r9142]
    Commit: [r9143]
    Feature Requests: #533

  • Mark Miesfeld

    Mark Miesfeld - 2013-05-19
    • status: pending --> closed
     
  • Mark Miesfeld

    Mark Miesfeld - 2013-05-19

    This feature request is available on SourceForge from the ooSQlite preview download page - ooSQLite Version 1.0.0.8707 and later

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks