Re: [gnome-db] Create SQLite db
Pavlo Solntsev <[email protected]> Wed, 13 Sep 2017 08:18:21 -0500
| Newsgroups | gmane.comp.gnome.db |
|---|---|
| Message-ID | <CADsq9iqgUXSgwV6a5D4e9joeM9GvpgfJZaYesx4KD3eCb65-+w@mail.gmail.com> |
--===============7630193016300364026== Content-Type: multipart/alternative; boundary="f403045c14c4752270055911fe60" --f403045c14c4752270055911fe60 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Corentin. Thank you for info. It is interesting. It looks like the DB file should be created before calling gda_server_operation_create_database(). I am exploring his approach. Thanks. -Pavlo Solntsev ---------------------------------------------------------------------------= ------------------ *Please avoid sending me Word or PowerPoint attachments.See http://www.gnu.org/philosophy/no-word-attachments.html <http://www.gnu.org/philosophy/no-word-attachments.html>* On Tue, Sep 12, 2017 at 7:46 AM, Corentin No=C3=ABl <[email protected]= > wrote: > Hi Pavlo, > In elementary's music application, we are using > gda_connection_new_from_string > https://github.com/elementary/music/blob/master/src/ > LocalBackend/LocalLibrary.vala#L140 > You also have a few examples in the source tree https://github.com/GNOME/ > libgda/tree/master/examples > > Regards, > Corentin No=C3=ABl, elementary developer > > 2017-09-11 21:04 GMT+02:00 Pavlo Solntsev <[email protected]>: > >> Hi, >> I am trying to create SQLIte DB. I used gda_server_operation_prep >> are_create_database >> (const gchar *provider, >> const gchar *db_name, >> GError **error); >> to obtain a GdaServerOperation object. provider =3D "SQLite" >> >> The returned pointer was checked for NULL. >> >> Then, I used gda_server_operation_perform_create_database to create DB. >> This function returns TRUE but I don't DB file. I was thinking, maybe >> format of db_name may somehow affect this? For now, I used the full path= in >> UNIX notation with .db suffix, just a DB name with .db suffix. In all >> cases function returns TRUE but I don't see any DB file. Could you plea= se >> clarify what would be correct use of GdaServerOperation functions to cre= ate >> DB? Thanks. >> >> >> >> -Pavlo Solntsev >> ------------------------------------------------------------ >> --------------------------------- >> >> *Please avoid sending me Word or PowerPoint attachments.See >> http://www.gnu.org/philosophy/no-word-attachments.html >> <http://www.gnu.org/philosophy/no-word-attachments.html>* >> >> _______________________________________________ >> gnome-db-list mailing list >> [email protected] >> https://mail.gnome.org/mailman/listinfo/gnome-db-list >> >> > --f403045c14c4752270055911fe60 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Dear Corentin.<div><br></div><div>Thank you for info. It i= s interesting. It looks like the DB file should be=C2=A0created before call= ing gda_server_operation_create_database(). I am exploring his approach. Th= anks.</div><div><br></div></div><div class=3D"gmail_extra"><br clear=3D"all= "><div><div class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><d= iv dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr">-Pavlo Solntsev<= /div><div dir=3D"ltr">-----------------------------------------------------= ----------------------------------------</div></div><div dir=3D"ltr"><em st= yle=3D"color:rgb(0,0,0);font-family:"Times New Roman";font-size:1= 6px">Please avoid sending me Word or PowerPoint attachments.<br>See <a href= =3D"http://www.gnu.org/philosophy/no-word-attachments.html" target=3D"_blan= k">http://www.gnu.org/philosophy/no-word-attachments.html</a></em><br></div= ></div></div></div></div></div> <br><div class=3D"gmail_quote">On Tue, Sep 12, 2017 at 7:46 AM, Corentin No= =C3=ABl <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" tar= get=3D"_blank">[email protected]</a>></span> wrote:<br><blockquote = class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid= ;padding-left:1ex"><div dir=3D"ltr"><div><div><div><div>Hi Pavlo,<br></div>= In elementary's music application, we are using gda_connection_new_from= _string<br><a href=3D"https://github.com/elementary/music/blob/master/src/L= ocalBackend/LocalLibrary.vala#L140" target=3D"_blank">https://github.com/el= ementary/<wbr>music/blob/master/src/<wbr>LocalBackend/LocalLibrary.<wbr>val= a#L140</a><br></div>You also have a few examples in the source tree <a href= =3D"https://github.com/GNOME/libgda/tree/master/examples" target=3D"_blank"= >https://github.com/GNOME/<wbr>libgda/tree/master/examples</a><br><br></div= >Regards,<br></div>Corentin No=C3=ABl, elementary developer<br></div><div c= lass=3D"gmail_extra"><br><div class=3D"gmail_quote"><div><div class=3D"h5">= 2017-09-11 21:04 GMT+02:00 Pavlo Solntsev <span dir=3D"ltr"><<a href=3D"= mailto:[email protected]" target=3D"_blank">[email protected]= </a>></span>:<br></div></div><blockquote class=3D"gmail_quote" style=3D"= margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div cl= ass=3D"h5"><div dir=3D"ltr"><div>Hi,</div><div>I am trying to create SQLIte= =C2=A0DB. I used=C2=A0gda_server_operation_prep<wbr>are_create_database</di= v><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(const gchar *provider,</div><= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 const gchar *db_name,</div><div>= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 GError **error);=C2=A0</div><div>to = obtain a=C2=A0GdaServerOperation object. provider =3D "SQLite"</d= iv><div><br></div><div>=C2=A0The returned pointer was checked for NULL.</di= v><div><br></div><div>Then, I used=C2=A0gda_server_operation_perf<wbr>orm_c= reate_database to create DB. This function returns TRUE but I don't DB = file. I was thinking, maybe format of db_name may somehow affect this? For = now, I used the full path in UNIX notation with .db=C2=A0suffix, just a DB = name with .db suffix. In all =C2=A0cases function returns TRUE but I don= 9;t see any DB file. Could you please clarify what would be correct use of = GdaServerOperation functions to create DB? Thanks.</div><span class=3D"m_-4= 173215040734833424HOEnZb"><font color=3D"#888888"><div><br></div><div><br><= /div><br clear=3D"all"><div><div class=3D"m_-4173215040734833424m_703870137= 5511349783gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div= dir=3D"ltr">-Pavlo Solntsev</div><div dir=3D"ltr">------------------------= ------<wbr>------------------------------<wbr>-----------------------------= -<wbr>---</div></div><div dir=3D"ltr"><em style=3D"color:rgb(0,0,0);font-fa= mily:"Times New Roman";font-size:16px">Please avoid sending me Wo= rd or PowerPoint attachments.<br>See <a href=3D"http://www.gnu.org/philosop= hy/no-word-attachments.html" target=3D"_blank">http://www.gnu.org/philosoph= y/<wbr>no-word-attachments.html</a></em><br></div></div></div></div></div><= /div> </font></span></div> <br></div></div>______________________________<wbr>_________________<br> gnome-db-list mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">gnome-db-list@= gnome.org</a><br> <a href=3D"https://mail.gnome.org/mailman/listinfo/gnome-db-list" rel=3D"no= referrer" target=3D"_blank">https://mail.gnome.org/mailman<wbr>/listinfo/gn= ome-db-list</a><br> <br></blockquote></div><br></div> </blockquote></div><br></div> --f403045c14c4752270055911fe60-- --===============7630193016300364026== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnome-db-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gnome-db-list --===============7630193016300364026==--