Git Product home page Git Product logo

Comments (7)

tgulacsi avatar tgulacsi commented on May 29, 2024

Please try the master branch, it has some changes which may help.

j [email protected] ezt írta (időpont: 2015. nov. 27., P 1:32):

Dear,

I have an table with field of varchar2(1024) , with valid spaces ASCII 32
to rigth.

When I fetch records , the field value has loss trailing spaces?

Exists an option for disable this one?

Thanks,
JM

fragment code:
"
stmtQry, err := testSes.Prep("SELECT field1 FROM table", ora.OraS )
stmtQry.Cfg().Rset.SetVarchar(ora.OraS)
...
rset, err := stmtQry.Qry()
......
for rset.Next() {

fmt.Println( len(rset.Row[0].(ora.String).Value) )
msgStream <- rset.Row[0].(ora.String).Value

}

"


Reply to this email directly or view it on GitHub
https://github.com/rana/ora/issues/53.

from ora.

jmptrader avatar jmptrader commented on May 29, 2024

Yesterday, before of test my code, I do :

go get -u -v gopkg.in/rana/ora.v3

It's fine?

Enviado desde mi BlackBerry de Movistar

-----Original Message-----
From: Tamás Gulácsi [email protected]
Date: Thu, 26 Nov 2015 21:25:16
To: rana/[email protected]
Reply-To: rana/ora [email protected]
Cc: [email protected]
Subject: Re: [ora] How not trailling rigth space in VARCHAR2 field ... (#53)

Please try the master branch, it has some changes which may help.

j [email protected] ezt írta (időpont: 2015. nov. 27., P 1:32):

Dear,

I have an table with field of varchar2(1024) , with valid spaces ASCII 32
to rigth.

When I fetch records , the field value has loss trailing spaces?

Exists an option for disable this one?

Thanks,
JM

fragment code:
"
stmtQry, err := testSes.Prep("SELECT field1 FROM table", ora.OraS )
stmtQry.Cfg().Rset.SetVarchar(ora.OraS)
...
rset, err := stmtQry.Qry()
......
for rset.Next() {

fmt.Println( len(rset.Row[0].(ora.String).Value) )
msgStream <- rset.Row[0].(ora.String).Value

}

"


Reply to this email directly or view it on GitHub
https://github.com/rana/ora/issues/53.


Reply to this email directly or view it on GitHub:
#53 (comment)

from ora.

tgulacsi avatar tgulacsi commented on May 29, 2024

That pulls the "v3" branch, you need the "master":
cd $GOPATH/src/gopkg.in/rana/ora.v3 && git branch -m master v3 && git
checkout -b master origin/master && git pull

j [email protected] ezt írta (időpont: 2015. nov. 27., P, 14:39):

Yesterday, before of test my code, I do :

go get -u -v gopkg.in/rana/ora.v3

It's fine?

Enviado desde mi BlackBerry de Movistar

-----Original Message-----
From: Tamás Gulácsi [email protected]
Date: Thu, 26 Nov 2015 21:25:16
To: rana/[email protected]
Reply-To: rana/ora [email protected]
Cc: [email protected]
Subject: Re: [ora] How not trailling rigth space in VARCHAR2 field ...
(#53)

Please try the master branch, it has some changes which may help.

j [email protected] ezt írta (időpont: 2015. nov. 27., P 1:32):

Dear,

I have an table with field of varchar2(1024) , with valid spaces ASCII
32
to rigth.

When I fetch records , the field value has loss trailing spaces?

Exists an option for disable this one?

Thanks,
JM

fragment code:
"
stmtQry, err := testSes.Prep("SELECT field1 FROM table", ora.OraS )
stmtQry.Cfg().Rset.SetVarchar(ora.OraS)
...
rset, err := stmtQry.Qry()
......
for rset.Next() {

fmt.Println( len(rset.Row[0].(ora.String).Value) )
msgStream <- rset.Row[0].(ora.String).Value
}

"


Reply to this email directly or view it on GitHub
https://github.com/rana/ora/issues/53.


Reply to this email directly or view it on GitHub:
https://github.com/rana/ora/issues/53#issuecomment-160046307


Reply to this email directly or view it on GitHub
https://github.com/rana/ora/issues/53#issuecomment-160141479.

from ora.

jmptrader avatar jmptrader commented on May 29, 2024

OK.

I've followed these steps, one by one. But I'm still with the problem.

My field1 is varchar2 (1024), it contains text of the form:

"XXXXXXXXXXXXXXXXXSSSSSSSSSSSSS"

where 'X' is any character and 'S' are spaces.

the fetch operation get 'XXXXXXXXXXXXXXXXX' only, :(

I can not anticipate the effective length of the field.

Thank you.

from ora.

tgulacsi avatar tgulacsi commented on May 29, 2024

Ok, I have a reproduction: 314b3f2

from ora.

tgulacsi avatar tgulacsi commented on May 29, 2024

Wow, quite strange.
"SELECT 'spaces ' FROM DUAL" works (see TestSpacesDual)!

BUT
"INSERT 'spaces ' INTO tbl" binds the unaltered value (see TestSpacesTbl) but the value in the table is without spaces (the "only space" case errs out as cannot insert NULL into the field)!

from ora.

jmptrader avatar jmptrader commented on May 29, 2024

It's great, thank's you.

from ora.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.