Jump to content




Database Api

api

  • You cannot reply to this topic
5 replies to this topic

#1 UnethicalClown

  • Members
  • 9 posts

Posted 23 July 2013 - 03:04 PM

DataBase api

Created by UnethicalClown and MKlegoman357

This API contains some basic functions for creating a database and is very useful if you are not familiar with making a database in computercraft. I will be updating this. Please tell me if you want something added or if something does not work correctly. For now all you need is a working knowledge of tables.

Functions:
Spoiler

Examples:
Spoiler



I hope you guys find this useful =D




Pastebin link: http://pastebin.com/6MnHjV9g
Spoiler


#2 Parmacoy

  • Members
  • 27 posts
  • LocationAustralia

Posted 23 July 2013 - 05:34 PM

Still lacking alot of features from the quick read i had, but keep it up, from my experience, the less interaction someone has to do with computercraft, the better. Why not focus on getting functionality like mysql, eg

SELECT * FROM test WHERE foo = '$bar'
that means SELECT ALL FROM <table/tables> WHERE <Field> = variable

im sure if you added in advanced search functionality / sorting, it would be a very good program, nice work so far

#3 UnethicalClown

  • Members
  • 9 posts

Posted 23 July 2013 - 11:07 PM

View PostParmacoy, on 23 July 2013 - 05:34 PM, said:

Still lacking alot of features from the quick read i had, but keep it up, from my experience, the less interaction someone has to do with computercraft, the better. Why not focus on getting functionality like mysql, eg

SELECT * FROM test WHERE foo = '$bar'
that means SELECT ALL FROM <table/tables> WHERE <Field> = variable

im sure if you added in advanced search functionality / sorting, it would be a very good program, nice work so far

thanks man you have given me quite a few Ideas indeed

#4 computercraftprogrammer

  • Members
  • 122 posts
  • Location$house->Earth->MilkyWay->Universe;

Posted 25 July 2013 - 12:26 PM

Neat! Although I am working on a Database already for computercraft using legitiment MySQL commands, like It parses stuff like "SELECT * FROM `cc`.`users` WHERE `username` = 'UMayBleed';" It is really complicated compared to this. you have functions for each command, unlike me, where I use a single function for all commands.
Great work though!

Also 1 question, How would you insert a row? you have
"-dbWrite(name,tbl)
Writes a table to the database."

But that makes a table, so how would you insert a row?

#5 UnethicalClown

  • Members
  • 9 posts

Posted 26 July 2013 - 07:51 AM

I realize how stupid this API is ATM but I am still working on it so ideas is what I need also it might take a while to release this is like the prototype or alpha version as well as being kinda just for people who don't know how to work with tables

#6 Thib0704

  • Members
  • 93 posts
  • LocationgetServer().getPlayer("Thib0704").getLocation();

Posted 26 July 2013 - 08:13 AM

This is a good idea, But is missing features.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users